How can I use unlicensed controllers on the PS4?

Question: Given that I use a PS4 and already have a few controllers that I want to use with the PS4 instead of buying almost the same controller licensed for the PS4 or void warranties of controllers, what options do I have?
Comment: I'm having trouble envisioning this question as a valid scenario; if you buy a device that's advertised to work, then...it should.  Your answer seems to be promoting a specific product, which feels sort of spammy.
Comment: @Frank The exact scenario is: Buy a controller like an arcade fightstick for the X360 (which was also available for the PS3) and try to use it with the PS4. That is, what *licensed* and *unlicensed* is supposed mean in this context, e.g. speaks the authorization protocol of the particular console, or not.
Comment: I removed most of the irrelevant information, as it was straying towards promoting a specific product, and getting awfully close to a hardware/software recommendation.  Still not really great, but I can see it being useful enough to keep.  But if you want to roll it back, then we're back to this being close to the recommendation line.
Comment: @Frank I rolled back the rollback, I wrote this last week, checked it today and thought it was good enough. I have to think about it again.
Comment: Ahh, that explains why it felt pre-constructed.  Questions like that work here, if you do it right, but it does twig spam senses.  Personally, I prefer questions that clearly explain the problem the asker is having, with whatever game or device they're having issues with.  It feel more organic and natural.
Answer:
Disclosure, I'm not the author of this software, just a user with the problem in the question who prefers FOSS software.

Use GIMX over Bluetooth with the Playstation 4
In this example you use a desktop, laptop or Raspberry Pi running Linux to which you connect the controllers and input devices you want to use plus a Dualshock 4 (DS4) controller. The DS4 in this setup is required for authentication and will get polled periodically by the Playstation 4 (PS4), so it needs to stay connected this way. While you can still use the DS4, I do recommend a spare DS4. All input and authentication data is sent from the computer to the console via Bluetooth. The adapter you are going to build from a Teensy board in the next section is required for the initial pairing process of a new controller to the PS4. Basically the adapter is a man in the middle between the DS4 controller and the PS4 during the initial connection setup.
More information is available on the blog, the FAQ, the forum and the wiki.
Hardware requirements and cost
The required Teensy 2.0 USB development board costs about $16. I bought mine from an online store in Germany for about 22€ with shipping included.
Depending on the reliability of your existing Bluetooth solution you may need to buy a Bluetooth dongle with a certain chip, prices range from $5 to $15. A USB to serial TTL converter for the complete DIY adatper isn't needed in this example, but since these are cheap you might want to get one too.
You can find suggestions for other hardware components to build your DIY adapter, but the Teensy 2.0 is recommended. Don't buy a Teensy with another version number like Teensy 3.0, that is a different chip which is not supported.
GIMX supported consoles and controllers
As far as I am aware Xbox, Xbox 360, Xbox One, Playstation 3 and Playstation 4 are currently supported.
It doesn't matter if the input devices are connected to the computer via USB, Bluetooth or something else. You can use every controller or device that is detected by the host operating system – Linux in this case – as an input device and you can map buttons and functionality as you like.
Playstation 4 force feedback wheel support functionality that currently needs funding.
Installation and instructions for pairing the DS4
On Ubuntu download and install the Debian package for your platform. You should also install the gksu package, otherwise you might get the "Can't restart bluetoothd" error message.
In this example we only need the EMUPS4PAIRING firmware and the Teensy Loader to flash it. You can download the other firmwares here. Extract contents of the individual zip files after download.
Pairing the DS4
Note that pairing does not need to be performed every time. If you use a dedicated DS4 regularly it ideally needs to be done only once. After that you can put the Teensy somewhere safe until you need it.

Flash the Teensy board with the firmware

Be sure that you have followed the instructions to install 49-teensy.rules and gave the binary proper permissions, otherwise you would need to use gksu.
Start the Teensy Loader, select the firmware (atmega32u4.hex), connect the Teensy, enable automatic mode and push the button on the Teensy board. You can disconnect the Teensy after the flashing succeeded.

Create a new connection

Start the GIMX launcher, select Bluetooth/PS4 for output and click the new button to create a new pairing connection.
In the next window select the Bluetooth dongle you want to use.
Now connect the DS4 you want to use to your computer with a USB cable and confirm the dialogue box. Select the DS4 in the next window, then disconnect it.
Connect the Teensy to your computer and confirm the dialogue box.
Connect the Teensy to the PS4, wait a few seconds and connect the Teensy with your computer again.

Troubleshooting: Remove devices in the Bluetooth menu of the PS4 when the DS4 connects directly to the PS4 instead of GIMX.
Video demonstration
I cramped a test setup onto my desk and made a video demonstrating paring and usage for GIMX version 3.5, it's only about 2:30 minutes long.

Don't be confused about the red button on the fightstick not working as expected in the video, it was swapped with another button in my custom configuration.
Using GIMX with the PS4
Controller configuration

You can download configurations from within GIMX, search the forum for a particular configuration or create your own, which is nothing more than detecting an event on the controller device and assigning an action.
Note that triggers L2/R2 on Playstation and LT/RT on Xbox are axis events, even if these are just buttons on your controller.
You can ignore everything about mouse calibration if you do not want to setup a mouse.
You can include multiple devices in your configuration, but they must all be connected when you start the connection, GIMX will warn you about devices that are not connected.

Start the connection

Open GIMX launcher if you haven't and select the appropriate parameters.

Output: Bluetooth/PS4
Pairing: the one you just created
Input: Physical devices
Config: the one you want to use

Click the Start button.
Push the PS button on the DS4 you paired.

Press Shift+Esc on the keyboard to end the connection.
You may need to restart your bluetooth service for normal desktop operation, example on Ubuntu: sudo service bluetooth restart
Answer: Datel fightsticks are compatible with PS4, sort of. You can use them in-game on Ultra Street Fighter 4 for example, however you cannot navigate the menu outside the game app using the fightstick.
The same goes for MadCatz Fightsticks.


Handling missing data in Sequence Analysis (TraMineR) within the observation window

Question: I´m using sequence analysis. I have a question about how to deal with missing data within the observation window. The starting point of the analysis is when respondents leave secondary school (t0). I want to examine respondents' life course over a time-span of 36 month after leaving school. The dataset contains longitudinal information of repondents toward their educational histories. I arranged the data in the 'states-sequence' (STS) format. So in each month the dataset provides information on respondents' status (for example "employed" or "training"). For 58 % of the sample the data provides information over the whole observation window. So for this group I can tell in every single month what they are doing. The sequences of the rest of the sample are shorter. Thus, the length of the sequences is not the same for all respondents. How do I handle sequences of respondents that end before month 36. What would be the way the missing values should be handled in TraMineR?
Comment: There are different ways to handle missing values in TraMineR. See Sec. 6.5 of the [User Guide](http://mephisto.unige.ch/pub/TraMineR/doc/TraMineR-Users-Guide.pdf). The choice between e.g. dropping or treating as an additional state will depend on the kind of analysis you plan to do.
Answer: (Sorry, not enough reputation to add a comment.)
Are you sure sequence analysis in required for your sort of problem? I'd suggest using time series analysis for interval variables (in case you're monitoring characteristics that can be projected on a numeric scale). This will help you to deal with missingness in an 'interval' way and apply various sorts of imputation methods like those mentioned here: Imputation methods for time series data .
If you deal specifically with ordinal data (say, switching from state to state monitored periodically), the recommended way is to convert your data to patterns (sequences of states) and model transitions between patterns, with methods like Discrete Autoregressive mentioned here: Analysis of Ordinal Value Time Series .


Sentence making sense?

Question: I'm using a sentence that "Authors give this idea in that somehow describing attitude in another perspective" Here I want to use the sentences with the word contemplate (to view or consider)
"Authors give this idea in that somehow contemplating the attitude in another perspective"
Is this make sense I mean is it okay to use "contemplating" here? or any better option. Just to keep in view I'm asking from an academic writing perspective.
Comment: Are you trying to say: _Authors convey this idea by describing (or contemplating) attitude from a different perspective_? If this is the case, it would be good to tell us what _this idea_ and _attitude_ mean here. Essentially, you can contemplate something without describing it. But you cannot describe something without contemplating it.
Comment: @Shoe, Now I changed my sentence in another way around,  can you check this one"authors of the manuscript given this (I previously mentioned in my text) idea that describe ((or contemplate)) the energy internet from another perspective "
Comment: Sorry, but I don't feel able to give sensible feedback on a decontextualised sentence, whose meaning is not clear to me. As to your key question, I suggest you look up _describe_ and _contemplate_ in a good dictionary, and decide which is the better choice to convey your meaning.
Comment: Don't take this the wrong way, but the idea of writing fancy for the 'academic writing perspective' may be the source of making your sentence hard to understand.
Answer: When you say that you're asking from an academic perspective, do you mean that you're an academic? Or do mean that you only want answers from academics?
There are too many ways to interpret your sentence. For example:

Authors contemplate this attitude from a different perspective.
Authors have a different attitude when they contemplate this perspective.
Authors have ideas that allow them to contemplate this attitude from different perspectives.

But to answer your question: Yes, I'm sure you can use the word contemplate when you rewrite the sentence.
Focus on clarity. Keep it simple.
Answer: I take the sentence to mean the following;
Authors give or use this idea in order to somehow contemplate or view the attitude from another perspective
Your use of the phrase in that is out of place. It does not work here. Also the term in another is not normally used in this way. These provide blocks against getting your ideas across.
These prevent the sentence from making sense.

Sentence making sense?


Contribution vs Motivation

Question: Can somebody explain to me what is the difference between contribution and motivation in any research paper?
Answer: Motivation: why is this an important problem? Why should anybody care about this?
For example:

X affects tens of thousands of consumers in the United States each year, and costs companies billions of dollars.

or

If we can solve X, we are one step closer to solving the biggest open problem in the field, Z.

Contribution: what is the new thing (result, approach, technique, whatever) that this paper describes, that advances the state of this field?
For example:

This paper describes a way to do X using Y, which is up to 200 times faster than the current state of the art.
Comment: @user2999915 A problem statement could just be "Here is a problem X." That's not really motivation, unless you say "We really want to know how to do X because [insert motivation here]..."
Comment: Can we then say motivation describes the problem statement?
Comment: @Mike Problem statement = "This is the problem we want to solve". Problem motivation = "The problem is relevant, because many people need to do X", contribution = "We solve these aspects of the problem".

Contribution vs Motivation


Vieta's formulae - looking for a plain English explanation of the general-case formulae

Question: I am working with a set of equations within which arise functions of the coefficients of a polynomial expressed in terms of the roots. The expressions get rather complicated as the order of the polynomial goes above 3, and so I want to write these coefficients using Vieta's formulae:
\begin{equation}
\sum_{1\leq i_1 < i_2 \cdots i_k \leq n}\left(\prod_{j=1}^k \alpha_{i_j}\right)
\end{equation}
However, I am struggling to disentangle this notation, in particular the expression beneath the summation and the notation subscripts for $\alpha$. I know what the result should be for a polynomial of order 1, 2, 3 4 and so on, but I would appreciate a plain-language description of how the notation describes this - and any suggestions as to how the expression could be made more straightforward to interpret?
Answer: This particular formula is for a particular $k$.
The summation is for every strictly increasing sequence of $k$ elements, in which each element ranges from $1$ to $n$ inclusive. The inequality $1\le i_1 < i_2 < \ldots < i_k \le n$ denotes that the sequence $(i_1, i_2, \ldots, i_k)$ should have $k$ elements, the elements are strictly increasing, and the elements are between $1$ and $n$ inclusive.
There are $\binom n k$ such sequences, so there are $\binom nk$ summands. Each summand is a product, which may be written as
$$\prod_{j=1}^k \alpha_{i_j} = \prod_{i\in\{i_1, i_2,\ldots,i_k\}}\alpha_i.$$
The product means that for each unique sequence, the sequence would choose $k$ of the $n$ roots, and take their product.
For example, $k = 4$ and $n=6$, one of the sequences is $(1,2,3,5)$, and the sequence corresponds to the product $\prod_{i\in\{1,2,3,5\}} \alpha_i = \alpha_1\alpha_2\alpha_3\alpha_5$. There are $\binom64 = 15$ such products to sum.
So I may reword the summation and product sign as
$$\sum_{S : k-\text{sequence which is strictly increasing between }1\text{ and }n} \left(\prod_{i\in S}\alpha_i\right)$$
Answer: This summation merely expresses the sum of all possible products of $k$ roots.
The roots, $\alpha_1$, $\alpha_2$, $\ldots,$ $\alpha_n$ have indices $1$, $2$, $\ldots$, $n$, so call the set $\{1,2,\ldots,n\}$ the index set. The summation,
$$
\sum_{1\le i_1<i_2<\ldots<i_k\le n},
$$
which could also be written
$$
\sum_{i_1=1}^{n-k+1}\sum_{i_2=i_1+1}^{n-k+2}\ldots\sum_{i_k=i_{k-1}+1}^n
$$
effectively runs over all subsets of the index set that are composed of $k$ elements from that set. So the first subset will be $\{1,2,\ldots,k\}$, the second will be $\{1,2,\ldots,k-1,k+1\}$, and the last will be $\{n-k+1,n-k+2,\ldots,n\}$. In the particular case $n=5$, $k=3$, the complete list of subsets is
\begin{align}
&\{1,2,3\},\ \{1,2,4\},\ \{1,2,5\},\ \{1,3,4\},\ \{1,3,5\},\\
&\{1,4,5\},\ \{2,3,4\},\ \{2,3,5\},\ \{2,4,5\},\ \{3,4,5\}
\end{align}
In the summation, the fourth of these subsets, $\{1,3,4\}$, to take an example, corresponds to $i_1=1$, $i_2=3$, $i_3=4$ and the summand will be the product $\alpha_1\alpha_3\alpha_4$.
You could express the summation as
$$
\sum_{\text{all size-$k$ subsets $S$ of the index set}}(\text{product of roots indexed by elements of $S$}).
$$
If you multiply out
$$
(x-\alpha_1)(x-\alpha_2)(x-\alpha_3)(x-\alpha_4)(x-\alpha_5),
$$
you will get $2^5=32$ terms:
\begin{align}
&x x x x x+x x x x (-\alpha_5)+xxx(-\alpha_4)x+xxx(-\alpha_4)(-\alpha_5)\\
&+xx(-\alpha_3)xx+xx(-\alpha_3)x(-\alpha_5)+xx(-\alpha_3)(-\alpha_4)x+xx(-\alpha_3)(-\alpha_4)(-\alpha_5)\\
&+x(-\alpha_2)xxx+\ldots\\
&\vdots\\
&+\ldots+(-\alpha_1)(-\alpha_2)(-\alpha_3)(-\alpha_4)(-\alpha_5).
\end{align}
If you think about collecting the $x^2=x^{5-3}$ terms in this expansion, you'll realize that, apart from a minus-sign issue, the resulting coefficient of $x^2$ is precisely the sum of products indexed by the ten three-element subsets listed above. I hope this suffices to illustrate the general principle.


Why is it difficult to break RSA?

Question: Given that an attacker only knows the public key and cipher text, why is it difficult to decrpyt the message ? If the knows the N value will he be able to decrypt it ?
Answer: The short answer is that nobody knows how to compute the inverse RSA (the "decryption") without knowing the prime factors of the modulus N; and nobody knows how to efficiently recover these prime factors from N alone. The private key, then, is knowledge of the prime factors: whoever generated the key pair produced the factors first, then multiplied them together to get N.
Knowing N (the public key) does not allow decryption; that's the whole point of the public key being, yeah, public: revealing it does not give away decryption power.

The long answer, when we get down to it, is: we don't know. There is no positive reason which explains why RSA decryption is hard without knowing the private key. We have no mathematical proof that factoring N is a real prerequisite for RSA decryption; it is just that we don't know how to decrypt RSA without knowing the prime factors (either a priori, or easily obtained from the private key). We have no proof either that factoring is hard; but 2500 years of research have not come up with a really efficient factoring algorithm.
Comment: @Cemre, no, private key is d where ed=1 mod phi(N). Computing phi(N) given only N is equivalent to factoring.
Comment: But isnt private key calculated by: e * d mod N ? So if I know e and N the I can calculate d right ?
Comment: I thought shors algorithm did efficiently allow factorisation, of course it can't be run on classical computers and quantum machines running it have managed to factorise the number 21 before decoherence set in. So i think 2048 numbers are safe for a while.

Why is it difficult to break RSA?


How to remove EOFError: EOF when reading a line?

Question: Basically, I have to check whether a particular pattern appear in a line or not. If yes, I have to print that line otherwise not. So here is my code:
p = input()
 while 1:
   line = input()
   a=line.find(p)
   if a!=-1:
     print(line)
   if line=='':
     break

This code seems to be good and is being accepted as the correct answer. But there's a catch. I'm getting a run time error EOFError: EOF when reading a line which is being overlooked by the code testing website.
I have three questions:
1) Why it is being overlooked?
2) How to remove it?
3) Is there a better way to solve the problem?
Answer: Nothing is overlooked. As per the documentation input raises an EOFError when it hits an end-of-file condition. Essentially, input lets you know we are done here there is nothing more to read. You should await for this exception and when you get it just return from your function or terminate the program.
def process_input():
    p = input()
    while True:
        try:
            line = input()
        except EOFError:
            return
        a = line.find(p)
        if a != -1:
            print(line)
        if line=='':
            return

Comment: in addition to this: `p in line` is much better than using `find` since you don't need to know where the substring is.
Answer: VS CODE FIX:
I was getting the same error using VS Code and this worked for me. I had modified the "console" line in my launch.json file to be this:
"console": "internalConsole"

I did this hoping to keep the path from printing every time I (F5) ran my program. This modification however causes it to run in the debug console which apparently doesn't like the input function.
I've since changed it back to:
"console": "integratedTerminal"

And at the start of my program I just clear the terminal screen using this code (I'm in windows):
#windows command to clear screen
import os
os.system('cls')

Now when I (F5) run my program in VScode it executes in the built in terminal, clears the path garbage that gets displayed first and works like you would expect with no exceptions. My guess is that the code testing website you are using is running in some kind of debug console similar to what was happening in VSCode because your code works fine on repl.it (https://repl.it/languages/python3). There is nothing wrong with your code and there is nothing normal or expected about this EOF error.
Answer: Nothing is overlooked. As per the documentation input raises an EOFError when it hits an end-of-file condition. Essentially, input lets you know we are done here there is nothing more to read. You should await for this exception and when you get it just return from your function or terminate the program.
def process_input():
    p = input()
    while True:
        try:
            line = input()
        except EOFError:
            return
        a = line.find(p)
        if a != -1:
            print(line)
        if line=='':
            return

Answer: You can use try-except block in your code using EOFError.
Comment: How does this differ from the existing answer?


Dog doesn't walk away from incoming car in driveway

Question: One of my dogs doesn't stand up and walk away from my car as I am parking it in the garage. Not even when I honk, she just looks at the car a bit annoyed and goes back to sleep, or chewing something. It makes it really hard to park or leave the house. Is there anyway to teach her to move away without making her scared of vehicles?
Answer: The best solution that comes to my mind is squirting water at her. It's a method often used by professional dog trainers to discourage unwanted behavior without punishing the dog or causing her pain.
Usually people use a small water bottle with a sports cap that allows them to squirt the water a meter or so away. If you don't want to leave your car, you may have to resort to some type of powerful water squirting gun that can reach the dog even further away. Just have the loaded water gun in your car (packed in a plastic bag to avoid leaks), lower the window and squirt water at your dog.
Throwing a small water balloon in her direction might be more efficient, but also more risky for your car. You shouldn't hit your dog directly with the balloon, just throw it at the ground directly in front of her to pop it.
The idea behind these methods is to disrupt your dog in what she's doing without causing her pain. Many dogs don't like getting wet, so they stand up and shake the water out of their fur. If your dog gets wet every time the car turns into the driveway, she'll stand up and move away before getting wet eventually. Unfortunately some dogs don't mind getting wet and this method doesn't work on them.
The only alternative I know in that case is to fill a few small screws, washers or nuts into an empty small plastic bottle and throwing the bottle in her direction. The rattling sound it makes when hitting the ground should be enough to make her move. You must make sure to never throw the bottle directly at her because you can actually injure her (nose, eyes, ears, paws and more) with a direct hit from the cap or the rigid edge around the cap.
Comment: Thank you, I will try it.


How can I get a copy of a letter / notice from the IRS from 2004?

Question: How can I get a copy of a letter / notice from the IRS from 2004? Or is there a way for me to get a statement from the IRS that I've made a payment on that letter or notice?
Answer: Ordered from fastest to slowest, you could try:

Registering for your account online and looking for your notice
Requesting a transcript for 2003 or 2004, as appropriate
Calling to make an appointment at a local IRS office


ARIMA Forecast Restrictions

Question: Is it possible to fit an ARIMA under a restriction that bounds the minimum to positive values? I'm using Minitab.
Comment: Transform your data to the whole real line, do the forecasts, and back-transform.
Answer: In Minitab, there is no option to restrict the forecasts to positive using ARIMA. Probably you need to consider doing log transformation before forecast and back transform after that as mentioned in the comment above.

ARIMA Forecast Restrictions


Automated way to find JUnit tests that leak memory

Question: The root of our problem is Singletons.  But Singletons are hard to break and in the meantime we have a lot of unit tests that use Singletons without being careful to completely clear them in the tearDown() method.  I figure that a good way to detect tests like these is to look for memory leaks.  If the memory used after tearDown() and System.gc() is more than when the test started, either the test leaked or more classes were loaded by the classloader.  Is there any way to automatically detect this sort of problem?
Answer: Could you introduce a subclass, between TestCase and your individual test classes, that did the cleanup?  Then subclasses would only be responsible for calling super.teardown() - and only those that had a teardown() of their own.
Answer: I completely agree with other posters that monitoring the memory usage isn't a viable way to track this - System.gc() is not going to behave as you expect, or with enough precision to achieve your goal.
You're going to need a tool that lets you inspect the reference graph and show allocation call stacks.
I've used OptimizeIt from Borland and JProfiler from ej-technologies, both with success (a quick google reveals that OptimizeIt may now be dead.)
There's also the possiblity of using JVMTI to throw together a better monitor for this specific problem.
Edit:  Wierd, but as I was reviewing this answer, I got a phone call from Embarcadero, who has apparently purchased OptimizeIt, done some updating and are now marketing under the name J Optimizer.
Answer: Just a thought: if you have two empty tests run right after one another, the second one should not have a different memory used after teardown().  If it does, you (probably) have a leak somewhere in your setup()/teardown() system.
Comment: Wouldn't the total heap size increase somewhere between the test runs - since junit now has to record an additional TestResult?
Comment: As long as no garbage-collection was running the memory used by the first run of the test isn't reclaimed.
Answer: I don't think this is a good approach. System.gc() is not guaranteed to fully clean up any unused objects as you think it will.
If your root problem is that you have unit tests which end up using global data (singletons) without properly cleaning them up, you should attack the root problem: these unit tests. It shouldn't be too too hard to find all tests that aren't using tearDown(), or to find all tests that use a particular singleton.
Comment: Time to get rid of all the singletons then :)
Comment: It's not hard at all to find them.  There's tens of thousands of them.  Most of them call Singleton.getInstance().reset() or something afterwards mitigating the problem.  There's probably a handful of tests that don't, and they are extremely hard to find.
Comment: I agree in theory but it would take years.  It's a ten million line code base and it's very hard to refactor Singletons in small chunks.
Answer: If your Singleton's are only intended to be initialized one time, you could have code that checks for reinitialization and logs the current stack when it detects that. Then if you check the stack, you will see which test got the ball rolling, and you can check the JUnit logs to see what the test run right before that was.
In terms of solving this problem more thoroughly, instead of detecting it I would recommend you have a singleton initializer that remembers what it initialized, and has one teardown method that tears down everything it initialized. That way tests can be made to only initialize via this class, and only has to do one thing in teardown.
I also think Carl Manaster's suggestion is a good one, but if you were using JUnit4, then you could have a teardown method that runs in the superclass without having to remember to call super. Unless you use the JUnit3 GUI, JUnit4 should be a drop in replacement. The only thing is to take advantage of its new features you have to migrate the whole test, you can't have both live in the same class. So tests that interact with these singletons would have to be migrated one whole test class at a time.
Answer: You could use the Eclipse Memory Analyzer to automate analyzing heap dumps taken after each test or probably better after all tests. MAT can find memory leaks fairly automatically.


Is overhead watering bad for all flowering plants?

Question: What about ground covers that flower (e.g. dianthus)? I understand that a little bit of an overhead shower is needed now and then but ground covers are just too low and wide spread to be watered from the base so they'll definately end up having wet foliage and flowers with every watering session. Won't that do harm?
Comment: Are we talking watercress, and water lilies? Plants like those love to be drenched.
Answer: No, they'll be fine, mostly, assuming they're in the ground, especially if they're perennials- don't forget they get rained on quite naturally anyway.
Some plants like mediterranean herbs, some of which may be used for ground cover (Thyme, Oregano) don't really like being too wet at the root, but having wet foliage periodically is not an issue, so long as it's not every single day for months and months, and particularly if the temperature is pretty cool. Cool or cold weather and permanently wet foliage/flowers is not a happy combination and likely will give rise to fungal infections.


repair ceiling leak stains

Question: After a heavy rainstorm, I saw stains on the ceiling of one of my rooms.  What's the proper way to repair stains on the ceiling caused by rainwater leak from the roof?
Comment: Besides what answers below are given to address the cause first, in a similar situation at an old house, a painter and a roofer told me to just use any oil based primer to paint over it, then repaint the ceiling. (Assuming you have the color for that.)
Answer: After fixing the leak, you might want to try bleach.  I had luck with 25 percent bleach in water.  I put a sponge, saturated with the solution, in a plastic tray and pressed it up onto the ceiling.  The stain returned in a few months and so I did it again...it is now gone.  You could try a small test area to see if it will work.
Bleach is nasty stuff.  Take precautions.
Comment: *After fixing the leak* is the important part. If bleach fails, you'll be repainting, which is the other normal solution. All options to fix the stain are pointless if you don't fix the leak first.
Comment: "After fixing the leak" needs to be in bold with a larger font...
Answer: AFTER FIXING THE LEAK is how this starts, but at a glance, that looks worse than a bit of bleach.
You probably have wet insulation that needs to be dried or replaced. You can find out for sure by cutting a small (8"x8") exploratory hole in the midst of the big stain.
If by some miracle, you don't have wet insulation, you now need to establish that the drywall is sound. Can you dent it with a finger? Is the edge of your cutout moist and easily crumbled? Then you need to cut back everything wet and replace it. Sorry. Failing to do that will probably lead to mold.
Lots of guides to fixing drywall on the internet. My only advice is to do many skim coats, rather than a couple of heavy ones that you need to sand a lot. Have at it.
Answer: There are products such as Ronseal Damp Seal, that are almost like a gloss. You paint over the stained part with it, and when it dries you paint it with emulsions as normal. It is supposed to seal in the damp and stop it coming back through the paint. I have used the Ronseal product and it has worked well.

repair ceiling leak stains


How to get number of physical CPU:s in Linux using C?

Question: I am aware that sysconf(_SC_NPROCESSORS_ONLN) will give me the number of logical processors. But how can I get the number of physical processors?
Answer: @Havoc P:
offline cpus aren't shown in /proc/cpuinfo .
CPU topology is described by /sys/devices/system/cpu/cpu*/topology/*
Answer: You could parse /proc/cpuinfo and count the number of distinct "physical id:" lines. Sort of annoying, but I don't know if there's a better option. If you're using GLib or another library with regex support it'd be easier. Or you could popen() a command line to do it if you're feeling really hacky.  example command line at: http://www.brandonhutchinson.com/Understanding_proc_cpuinfo.html
Comment: POSIX regex support (BRE and ERE) is part of the standard library on any POSIX system, including Linux. No need for glib.
Answer: I think the best way to get this information is to use hwloc: http://www.open-mpi.org/projects/hwloc/.
They provide a bunch of user tools that let you get at the cpu topology of a system, but they also provide a library that you can use from C: http://www.open-mpi.org/projects/hwloc/doc/v1.1.1/#interface
Answer: Perhaps this answer to a similar question does help. There's a comment about the code not being correct, but it could be a good starting point.


MacBook Pro failing Internet Recovery with exclamation mark

Question: My MacBook Pro from 2009 restarts itself and doesn't charge, I tried recovery hd but I hadn't used Time Machine so the option is not there and now I'm trying Internet Recovery it give an exclamation mark on the big round web icon.
Answer: That Mac is too old to use Internet Recovery.
Computers that can be upgraded to use OS X Internet Recovery
Your choices are …

the Recovery Partition
a boot DVD
a USB key, made on another machine
Hardware test
Answer: Try retting the System Management Controller [SMC] (instructions here). This may be because some settings may be messed up.
There may also be a short circuit in your charger which may be causing your MacBook Pro to crash since it is the only way to protect its self (this is just a guess)
If this doesn't work please let me know and I will try and find another solution.
Edit
It may also be the circuit in your MacBook Pro.


Find the flux leaving the surface of the sphere: What will the position of line charges look like diagrammatically?

Question:
I am not able to understand how the two uniform line charges will look like in space. It would be of great help if someone could draw the uniform line charges in cartesian coordinates and upload it here.
Answer: This should probably get a homework tag, but here goes:
Since I can't give you a 3D image on a 2D screen, let's just take a slice.  Luckily the problem is set up to do that reasonably easily.  We can represent two at the same, z = +1 and z = -1.  The equation for the sphere in A is $$(x-3)^2+(y-1)^2+z^2=2^2$$
for z = +/- 1
$$(x-3)^2+(y-1)^2+1=4$$
$$(x-3)^2+(y-1)^2=3$$
So we can draw a circle with center (3,1) and radius sqrt(3) in the z = +/-1 slice.  Since y = 1 is the center, the y = 1, z=+/-1 lines will run right through the center of our slices and the total distance will be the diameter 2*sqrt(3) in both cases for a total distance of \$ 4 \cdot \sqrt3 \$
meters.  Multiply by 20 for \$80 \cdot \sqrt3 \$ nC
Problem B is a little tougher

But with a bit of geometry we can show that the chord is 2sqrt(2) for each slice, thus a total charge of \$ 4 \cdot \sqrt2 \$ meters or \$ 80 \cdot \sqrt2 \$ nC
Comment: 3rd formula should be "= 3". It's a good start but you need to apply the fixes and not leave it hanging.
Comment: good catch @Andyaka!  I fixed it!
Comment: oops, those are just the lengths in meters, so you need to multiply by 20 to get nC of charge


Is アルコール from Portuguese?

Question: The word アルコール is very similar to the Portuguese alcohol (pronounced alcōl), this seems closer than the English アルコホール. So is the real etymology Portuguese rather than English?
Comment: With regard to this question, I think the meaning of "real etymology" is the language from which the word was borrowed.
Comment: well, it could also be French... difficult to say when europe countries use almost the same word everywhere... Wiktionnary says Holland `オランダ語: alcohol からの音写。alcoholの語源は、アラビア語のal-khwl(アンチモン硫化物の粉末)またはal-ghawl(精霊)であるとされる`
Comment: It would also probably help to define "real etymology". The furthest back we can trace the world that I know of is Arabic, which is true for all of the Western languages.
Answer: Surveying various resources, here's what I've found:

Shogakukan's 国語大辞典 states it's from either Dutch or English alcohol (my local copy: "(オランダ・英alcohol)")
Different editions of Daijirin state either Dutch definitively (my local copy: "アルコール [0] 【(オランダ) alcohol】") or possibly English (third edition, online here: "アルコール .【alcohol】" -- implying English if no other language is specified).
Daijisen states Dutch or English ("アルコール(〈オランダ〉・〈英〉alcohol)").
The fifth edition of the Shinmeikai also states Dutch (my local copy: "(オ alcohol)", with the オ short for オランダ).
The Japanese Wikipedia article's section on the etymology of this term states a source from Dutch in the Edo period (1600-1868), and notes that there used to be an /h/ in there much as in Dutch or English, but that historical kana usage and pronunciation changes led this ホ to become just オ, yielding the アルコール pronunciation of today.

So ultimately, the emerging consensus is that アルコール is not from English, but rather from Dutch alcohol, with the /h/ dropping out over time due to normal Japanese historical processes.  We know that both the Portuguese and Dutch were very active in trading with Japan prior to and (for the Dutch) during the Edo period.  In light of the historical record, English can be ruled out, but Portuguese could still be another possible source.
Comment: Possibility yes, but rather small. Wiki for shochu states the distilled alcohol Portuguese introduced was arak and such name was used by Japanese. The use of "alcohol" for "alcoholic beverage" not a chemical or medical term seems quite recent in Europe. And Portuguese missionaries were not particularly renowned for introducing pharmaceuticals to medieval Japan. Are there examples of scientific words borrowed from Portuguese in.Japanese?
Comment: Portuguese were actively trading with Japan in Edo period? Except for early years, what sources claim so?
Comment: You're right, that was poorly worded -- the Portuguese were mostly kicked out in 1614 when the Tokugawa Shogunate expelled the Jesuits, prompted in part by a sense that the Catholic proselytization efforts could lead to potential threats to their authority.  That said, the first Portuguese to visit Japan did so in 1543, with a substantial presence [for the next several decades](https://en.wikipedia.org/wiki/Nanban_trade).  This period produced numerous other Portuguese-derived loanwords (such as パン, 天婦羅, etc.), and this seems to leave open the possibility of a Portuguese origin for アルコール.
Comment: You've prompted me to do more digging.  Thank you for that.  :)  I found a reprint online of the 1960 Japanese translation of the 1603 Nippo Jisho, and the relevant page [here](https://archive.org/stream/hoyakunippojisho58doit#page/32/mode/2up) (requires a free registration at https://openlibrary.org/) is notably missing any entry for *arukōru*.
Comment: That said, it is also missing entries for *pan* ([relevant page](https://archive.org/stream/hoyakunippojisho58doit#page/478/mode/2up)), *tabako* ([page](https://archive.org/stream/hoyakunippojisho58doit#page/594/mode/2up)), and *tenpura* ([page](https://archive.org/stream/hoyakunippojisho58doit#page/646/mode/2up)), which would all probably have had some currency by 1603 -- raising the question of whether this dictionary includes any such borrowings.
Comment: 【蛇足】 - Shogakukan's *Kokugo Dai Jiten* and Daijirin both state that アラキ is from Dutch, not Portuguese.  This makes some sense historically, since the most likely trade route for arak to reach Japan would be from Indonesia, which was a Dutch colony.  Then again, [the Japanese Wikipedia article on アラック](https://ja.wikipedia.org/wiki/アラック) states that アラキ derives from Mongolian **архи{arkhi}** instead, coming in via Dutch-held Nagasaki. I think this derivation makes more sense phonetically, as the final vowel would probably be *u* if it had come from Indonesian *arak* > Dutch *arak*.
Comment: Long story short, Dutch is indeed the more likely source language, but I cannot find any clear means of ruling out a possible Portuguese derivation.  You note that *use of "alcohol" for "alcoholic beverage" ... seems quite recent in Europe*; however, a more recent borrowing from Dutch or English is then unlikely, as the process of `/h/` elision is older.
Answer: 大辞林 says

アルコール [0] 【オランダ alcohol】〈「亜爾箇児」と当てた〉

so it seems to be from Dutch (although unlike Portuguese, Dutch does pronounce the H).

Is アルコール from Portuguese?


Missing Target Objective

Question: I'd just finished the lesson on blending in with the crowd and was told to go find Da Vinci. However, his workshop never showed up on my map. Does anyone know how to fix this?
Answer: Resetting the game (or I think AC2 has a reset to checkpoint feature that might work) usually reset the mission in progress if your mission has glitched out.
Been a while since I played AC2 but I also think Da Vinci's Workshop is not a location that is on the map, except when a mission needs you to get there (and it will just be your objective marker). I don't remember any mechanic where you had to get back to Da Vinci's workshop outside of a mission to do whatever. So that is probably why it is not shown as a 'neutral' marker on the map.
So continue on following the 'Next objective/mission' marker and it should be fine.
Comment: Thank you for the help!

Missing Target Objective


Why are Trill symbionts so rare?

Question: Is there any information that would explain why there are so few symbionts when there are so many Trills?  My only guess is that they have shorter reproduction seasons and longer gestation periods than host Trills, but it seems there would still be more symbionts per Trill because of their long lifespan which I seem to remember is 9 times longer than a host Trill's.
Comment: The Dax symbiont had had 9 official hosts by the end of DS9, plus 2 unofficial ones
Comment: Symbionts may live "9 times longer" - but if they only ever have one offspring each in their lifetime, the population would still not grow.
Answer: All symbionts are capable of being paired with a host. Not all hosts are capable of being paired with a symbiont. Therefore, the number of joined trills has to naturally be lower than the total number of host trills.
Add to that the fact that when joined trills reproduce, only the host species is reproduced, not the symbiont species. So even though Dax had numerous children, Dax didn't actually produce any symbiont offspring in those cases. And since pretty much all symbionts are joined and probably spend the majority of their life as a joined lifeform, symbionts likely only have an opportunity to reproduce for a very small fraction of their life. AFAIK, the symbionts are only bred on the Trill homeworld prior to their first joining, whereas the host species live and reproduce all over the alpha quadrant and can do so for at least half of their adult lifespan.
Also, symbionts are the more dependant and vulnerable species of the two. When they aren't joined, they have to be kept in stasis or in underground nutrient-rich pools (which apparently only exist on the Trill homeworld). The joining process, screening process, host-replacement infrastructure, as well as the tending of the unjoined symbionts are all undertaken by the host species. So that also increases the ratio of hosts to symbionts.
Lastly, the culture of trill society has evolved (or maybe been carefully engineered) to revere and greatly value symbionts. The joining commission has deliberately misled the public into thinking that only a small fraction of the host species is even capable of being joined (when in reality it's more like half) in order to prevent people fighting over symbionts as possessions. They've also put in place a highly selective screening process that maintains the prestige of being a joined trill, as well as ensuring that only the best and brightest of the host species receive a symbiont.
If Trill culture were different, perhaps the symbionts would be farmed like we farm Chicken or Pigs or Cows. Then the symbionts wouldn't be so rare.
Comment: @Keen I don't follow your logic. Not all hosts can be joined, so there will always be a fraction of unjoined hosts; thus (total number of hosts) = (joined hosts) + (unjoined hosts), so there will always be more total hosts than unjoined hosts. The number and condition of  unjoined *symbionts* isn't relevant (to that part of the answer, anyway.)
Comment: This: `the number of joined trills has to naturally be lower than the total number of host trills.` is incorrect as the symbionts that aren't joined can just hang out in the pools in the Caves of Mak'ala.
Comment: Your first paragraph is incorrect.  Not all symbionts are joined.  When they're not joined, they're hanging out in pools in the [Caves of Mak'ala](http://en.memory-alpha.org/wiki/Trill_symbiont) on Trill.
Comment: It looks like the first paragraph has been fixed now.  I think this answer is more directly geared to answering the question than the other upvoted answer.  Both answers seem fairly reasonable.
Comment: @MichaelEdenfield The first paragraph should mention that not all symbionts will be joined at any given time, which further limits the number of joined hosts.  At least, I think that's what my line of thinking was 7 months ago.
Comment: @Mike "Not all hosts can be joined" - have you seen [Equilibrium](http://en.memory-alpha.wikia.com/wiki/Equilibrium_%28episode%29)?
Comment: Related: https://scifi.stackexchange.com/questions/107080/how-did-trills-get-the-idea-of-putting-symbionts-inside-themselves
Comment: yeah, strong "no" vote on this answer being correct. there's an episode that proves the "joinable" humanoids are actually not as rare as they want the population to think
Answer: The Trill are a symbiotic species of at least two, possibly three, distinct species; two humanoids and one worm-shaped symbiont. How the two/three species formed their rather unique bond is not known to Federation scientists, so the rationale and processes that determine the rate of adoption of hosts to symbionts is as yet unknown.
The worm-like symbiont is a long-lived species capable of living 300 years or more. One symbiont could outlive seven to ten of its humanoid hosts. There have been at least two species that have been seen to have been Joined Trill.
The first species, known for their forehead protrusions, was seen onboard the Next Generation's Enterprise during a peace treaty event where Riker temporarily hosted the symbiont after the original host, Odan, was killed. The second species, known by their spots, has been best represented by Jadzia Dax onboard the space station, Deep Space Nine.
Trill symbionts are not as rare as is believed by other races of the Federation. The reason the joined Trill are less often seen is because the Trill have increased the screening requirements of hosts to become Joined to prevent potential events similar to those caused by the Host Joran while bonded with the Dax symbiont. Joran was both insane and a murderer who passed the host screening exams. Since the screening process was unable to detect Joran's instability, the Trill opted to reduce the number of Joined Trill, spending years in training and psychological profiling to ensure the successful joining of the two species. All records of Joran's instability have been purged from the program and remain a state secret. As a result, being a host is considered to be an elevated role in their society.
It makes sense that the nearly immortal, worm-like symbionts have a significantly reduced population since they live so long. On Earth, the longer an organism lives, the lower its reproduction rate. This makes sense since long-lived organisms would overrun their environment and consume all of the resources in that environment. It also seems that the symbionts require significant care during their development, which might also keep their numbers rather low.
Comment: I think your third paragraph has it backward; the reason for the strict screening process is that there are few available symbionts, not vice versa.
Comment: Slight addition to the symbiont lifespan. In *Children of Time* (s5e22) Dax is shown to have survived over 200 years after being transported back in time. That would give the Dax symbiont an age of *at least* 500 years. (At least because at one point Jadzia Dax tells a Jem'Hadar "I stopped counting at 300." about her age.
Comment: so THAT's how they explained away the first appearance of trills...
Comment: Do you have any source that supports the two species hypothesis?
Comment: Been busy all day. I don't need anything but the canon of the existence of two DIFFERENT Trill with two different requirements for existence. The first could not be transported, the second could. Both were called Trill and just like on Earth where there were more than one hominid species, there could have been more than one host species for the Trill. The shows themselves are the canon for the event.
Comment: @ThaddeusHowze I think what user366 was getting at is, is this canonically accepted or canonically retconned? Without the "discrepancy" having ever been addressed in-universe, I don't think there's a way to actually know for certain. For what it's worth, in the absence of any such clarification I'm happy to agree that we ought to lean on the side of canonical acceptance (even though we _never_ saw species #1 again). But this is clearly not always so; consider as another example silly things like O'Brien's rank; we are, canonically, supposed to ignore the discrepancy.
Answer: Likely for the same reason many other species are rare: Operating requirements.
We only know of four environments a symbiont can survive for even short periods of time:
0. In the pools on the Trill homeworld.
1. Inside a biologically compatible Trill person.
2. Inside a human.
3. Independently, in a normal atmosphere.
We know there's a limit on #3, since the Dax symbiont had to get a new host, and that's how we got Ezri. We know Symbionts can only survive in humans for a short period of time "and humans aren't even native to Trill, so we can ignore them for this answer". We know that only half of the Trill population can be joined, and in practice, the numbers are lower. And we know that the symbiont pools require very careful maintenance. "Trill is probably the only planet where being a pool cleaner requires a master's degree in chemistry."
So two environments are only usable for short periods of time, and one of them isn't even environmentally native. One of them is limited in population. And one of them requires extremely complex maintenance. The Symbionts probably are limited in population because there's only a finite amount of usable habitat space, and the species' current reproduction rate has evolved to work with this.
In a similar vein, elephants have evolved to have limited reproduction rates, probably because of the food requirements to have a child and raise it. The social behavior of Meerkats, Canines, and ants have evolved for similar reasons.
In summary, the Symbionts' population is limited because there's only so many places they can live safely.
Answer: It is likely that most symbionts do not want to join with a host and prefer to live as symbionts. After a symbiont joins with a host, the host becomes dependent on being joined with a symbiont and the symbiont becomes dependent on being joined with a host. There may be a risk of detah for the symbiont if they are not implanted in a new host on time after the previous host dies, but symbionts can live by themselves if they decide to not join with a host, or before joining. Dax lived for 150 years without a host before joining with their first host. It would be interesting to eventually meet unjoined symbionts, and what their voice would sound like through the universal translator.
Comment: This feels like headcanon. Can you back any of this up with evidence from the shows?

Why are Trill symbionts so rare?


Save content dynamically with Javascript

Question: I want to allow my clients to be able to have a save-dialogue come up to save data that I've stored in Javascript.  I can't direct them to an existing file because you can't modify the file system directly with Javascript.
Is it possible to send data directly to be saved (of course through a save-dialogue. Otherwise, it would be a crazy exploit).  I'm trying to make it so my users can create content on my site and be able to download it.
Answer: You could use links with dataUrl to create a save link : (this need you to encode your data using base64)
var a = document.createElement('a');
a.href = "data:text/plain;base64,"+base64_encode("plop");
a.innerHTML = "save";
document.body.appendChild(a);

You can get the base64_encode function at http://phpjs.org/functions/base64_encode:358 .
Users would need to right click the link and choose "save as..." to save the file on their filesystem.
Comment: Would this mean that you first need to save the data from Javascript to the URL that you use with a.href ?
Comment: yes, but you can workaround this by setting the href on the mousedown event. Or you can have 1 button that generates the href of your link and that displays it.
Comment: I understand that there are some data in Javascript, say `var data = "ABCDEF";` and these data should be stored in a local file. So, the data are not accessible via URL. To access them under a URL, you first need to upload them to the URL, before you can get them via your href.
Answer: You could create a save button, and then offer a download dialog. And by allowing users to upload the file again, and parse its contents, you could load your application.
Answer: There are several ways of doing that:
Server Side

Store the serialized form data (or whatever data) in a data base with a unique id, and give the ID to the user, when he wants to load, he'll supply the ID, and you'll whip the data for him.
Account system, assuming you have an account system, you can link each form data to a specific user.
Serialize the data in a way, and give it to the user as a downloadable file, then when he wants to recover, he will upload the file, you parse it, and display it for him.

Of course both solutions require an AJAX solution to communicate with the server.
Client Side

If your site is modern (You don't care about old browsers) you can use Local Storage to save his input on his computer, and then automatically load it from his memory when he returns. Note that browser support is not great, you should use Modernizr or something similar to test for it.
Answer: What about using server sessions and storing content there based in DialogId and SessionId.
Flows:
 1. user stores info. session_id[dialog_id] =
 2. user retrieves info.  = session_id[dialog_id]
You may use json and base64 to transmit bulk and structural info.
Answer: I suppose you want to save the data in a file on the client's computer.
You cannot do it directly because JS cannot access the local filesystem.
But you can achieve it via the server. You would at the same time
send the data to the server and download it to the
client. The download opens the usual "Save As..." dialog where the client
can specify the file name.
A possible concrete implementation uses a form that makes a POST
request to the URL save.php, passing the data to be saved in
a hidden input field save_data. The result of the request is
directed to an invisible .
<form action="save.php" method="post" target="save_target" onsubmit="save();">
    <input type="hidden" id="save_data" name="save_data" value="" />
</form>

The JS function save() prepares the data to be send:
function save() {
    document.getElementById("save_data").value = ...;
    return true; // or false if something wrong
};

The PHP page save.php on the server processes the POST request and downloads the
data:
$data = $_POST['save_data'];
$size = strlen($data);
$contentType = "text/plain"; // MIME type
$defaultName = "x.txt";

header("Content-Type: $contentType");
header("Content-Disposition: attachment; filename=$defaultName");
header("Content-Length: $size");
echo $data;


How To Check If Microphone Is On

Question: I'm using VisualBasic (and I'm kind of new to it). How can I check if the microphone is on? I'm capturing a video from the webcam, but I also need to make sure that the microphone is on. I could not find out how to check that.
Answer: You need to sample some audio, measure the level of the signal you're receiving (peak or RMS or something), and then judge if it's more than just the noise-floor of the microphone input on the PC.
I don't think there's any OS help to do this specifically.
You might need to come back with "How do I capture an array of audio samples in VB?", or something like that.
Answer: No VB experience, but if you want to check if a users mic is working (and as far as you can see programmatically it is), it may be helpful to look at how an app like Skype does it; asking the user to verify manually (version 4 does quite well with this, I think). Games like Enemy Territory: Quake Wars and the Source Engine games do similar things. Of course, that may not be appropriate for what you are doing, and something like Will suggests may be far more appropriate.
Comment: My guess is that Skype does pretty much what I was suggesting - they're going to be capturing the raw data *anyway*, so analysing it to see if it looks like it's picking anything up would be pretty easy.

How To Check If Microphone Is On


Splits in Wood On New Header - natural or need to reinforce?

Question: We had a contractor add a new header beam in a load bearing wall where we opened up the space to add a closet.  This was installed new about 2-3 months ago and just noticed a fair amount of horizontal splits in the header.  Is this natural as the wood settled/dried, or should we be concerned?  Don't want them to drywall over this if we need to do anything to fix or reinforce the structure.
Thoughts and advice?
Answer: Looks like seasoning checks. A tree ring's tangential moisture shrinkage rate is greater than its radial shrinkage rate. As the tree dehydrates, then, radial wood restrains the tree ring from shrinking as much as it wants to. The fissures from your images open because of the resulting stress. Sawing the tree into lumber when it's still green prevents a lot of checking. Keeping the wood's edge width at 4" and smaller also prevents a lot of the checking. It still happens, though.
Through checks are potentially an issue. Especially in the middle third of the beam, if you can stick a depth gauge into a fissure deeper than, say, 3/4", then you might have cause for concern. Since the one piece is probably paired with another piece without the checking, the probabilities work in your favor. Design values in the wood engineering code are based on the 5th percentile of strengths within a random sample of each species and grade, so even if the strength of the pictured piece is low (max strength loss from through checking is 50%), it and its pair are probably sufficient for the design load.
Unfortunately I can't quantify how probably because the lumber grading organizations don't seem very interested in publicizing their statistics under ASTM D1990 testing. Even with additional information from you on grade and species, I'm not convinced that the necessary data are available for computing probabilities. I've looked quite a bit in the past.


What happened to Goose in "Captain Marvel"?

Question: In Captain Marvel, Agent Fury fell in love with an adorable cat called Goose. It is clear that this is long before The Avengers, but Goose does not appear in any of the shows after that. What happened to Goose?
Comment: That creature wasn't a cat.
Comment: It's a flerken!
Comment: Same question over on movies, https://movies.stackexchange.com/questions/97636/what-happened-to-captain-marvels-cat
Comment: What's flerken ?
Answer: The directors Anna Boden and Ryan Fleck were asked this question in an interview with Entertainment Tonight. Their theory is that Goose stayed at Pegasus and just became the "base cat".

The biggest star of Captain Marvel, in movie that has Jude Law and Annette Bening and Sam Jackson, is Goose the cat. In my desire for a Goose spin-off, I need to ask: What do you think Goose was getting up to in those six years after Mar-Vell died and before Carol came back to Earth?
Fleck: I feel like he was the base cat. He was the Pegasus cat that everyone just loved and hung out with and it was like, you know, "Oh, there's Goose." Everyone just sort of came together and took care of it. Now, what it was doing behind the scenes when no humans were around, that's up for more fan speculation. But in our minds, that's what Goose was doing at Pegasus, was just being the base cat.
Entertainment Tonight, 'Captain Marvel' Directors Respond to Theories That Fury Is a Skrull (Exclusive)

And whilst this is answering the question of what happened between Carol leaving and coming back I see no reason why it would change when Carol leaves again and Goose is left alone with Nick. Presumably the base that Goose was staying on was just a different one.
Samuel L. Jackson has commented on this in an interview himself stating that Goose was probably in his office up until at least the start of Iron Man. As it is an actor stating this though I'd take it with a pinch of salt.

What was Goose doing, where was he, between the end of Captain Marvel and the beginning of Iron Man?
He was in my office apparently, there's all that stuff. Even though we never saw him he was around. I mean we got the, y'know, the thing back somehow. I walked in my office, he'd thrown it up, it was sitting on my desk or whatever so.

And of course we have what Kevin Feige has said in an interview previously but that is currently covered in the other answer so I won't repeat it here.

Note that Goose is not a cat but a Flerken, unless everyone is wrong and in fact cats can have tentacles spewing out of their faces...

Talos: Oh my God! Get that thing away! How'd that get in here?
Carol: The cat? This isn't what you're afraid of, is it?
Talos: That's not a cat. That's a Flerken.
Captain Marvel
Comment: There is a flerken in the "The Marvels" trailer. No idea if it's supposed to be the same one.
Comment: I have always wondered who would win in a battle between Goose and Thanos without the infinity gauntlet.
Answer: There is currently no information about what the cat in question, Goose, was doing after the events of Captain Marvel, whether she is still alive, or whether she is still kept by Nick Fury. However, President of Marvel Studios Kevin Feige has expressed interest during interviews in exploring the character further in the Disney+ television shows.

I'm wondering what has Goose been doing for the last 20 years? Can we get like a short film on Disney+ where we would like see that Goose was secretly offscreen at all of these important events?
I love it! And by the way, that's one of the fun things about Disney+ is we could actually do ideas like that. The fun thing about introducing new characters and all these movies is suddenly going from a character that maybe you'd heard of if you'd read the books, but if you hadn't, you'd never heard of him. And then you see the movie, you go, "I want to see more of that character." And the fact that you and other people are asking, "When do we see more of the cat?" The question is "how long – what is the lifespan of a flerken?" It's a good question.
Comment: FWIW the _Captain Marvel_ directors have stated they believe Goose became the "base cat" at Pegasus, see [my answer](https://scifi.stackexchange.com/a/213989/58193), so there is some information on what he could be doing. On top of that Goose is ___not___ a cat but a Flerken.
Answer: Goose made a comeback in The Marvels, the 2023 sequel to Captain Marvel. The movie revealed that after the events of Captain Marvel, Goose stayed with Carol's best friend, Maria Rambeau. However, when Maria's cancer recurred some time after the Blip, she entrusted Goose to Carol's care.


In thunderbird I do not want it to automaticly open new email

Question: I have a dell with windows 7.  As soon as I click on an email it opens in the window below. I do not want this to happen, how do I change this?  Thanks.
Answer: You can configure Mozilla Thunderbird to start up by displaying a website in the lower-right pane, instead of the content of an email.
Tools --> Options --> General
https://support.mozillamessaging.com/en-US/kb/configuration-options-startup
(edited to correct the URL for my answer)
Comment: Sorry - the iPad's crazy copy-n-paste got me again.    Here's the correct URL for my comment.                                            https://support.mozillamessaging.com/en-US/kb/configuration-options-startup
Answer: It sounds like you want to hide the message preview pane that takes up the bottom half of the screen by default in Tbird. This would allow you to see a full-screen list of all your emails, but no message content until you actually open an email.
In my Tbird (v 17.0.3), I can turn the message pane off by pressing F8 or going to Options > Layout > Message Pane.
If we have the wrong idea please provide more info.
Answer: Go to Tools > Account Settings > Server Settings and uncheck "Check for new messages at startup." That's it.
Frank D
Comment: I think what he's looking for is a way to shut off the preview feature, this looks more like a way to prevent Thunderbird from actually checking for mail on startup.


Support with, in, or to?

Question: Should it be 'the case worker supports the client IN finding their goals', 'the case worker support the client WITH finding her goals', or 'the case worker supports a client to find her goals'? Or something else? I can't find any answers to this anywhere!
Comment: They're both fine (but unless you particularly like "jargon") ***helps** them to find...* would probably be more likely. Plus people usually get help to *achieve* their goals, not *find* them.
Answer: I think that "in finding" is the better sentence here. "Support with" is quite common in many dialects and would be understood, but it's probably better reserved for describing the means of support. e.g

She supported the project with her knowledge of case studies

In this example, it's clear that she's supporting the project by the means of her case study knowledge. It clearly suggests that it's her knowledge that she is using as a way to support the project.
I would avoid using the to-infinitive to avoid ambiguity. For example if you look at this sentence:

She supported the project to further her own career

In this sentence it's unclear if she supported the project in order to get ahead in her career, or if the purpose of the project was to further her own career. Did she support the "further her career"-project, or did she support an unrelated project with the ultimate goal of getting ahead career-wise? I'd be inclined to reserve the to-infinitive construction for the latter situation. Another example:

A lawyer supports their client to make money

This sentence is very close to yours and as you can see it's highly ambiguous. Do lawyers help their clients in order to make money for themselves, or do they assist their clients in making money?
In your example, while contextually it's clear what you mean, from a purely grammatical perspective it's unclear whether the case working is assisting the client in order to find her own (the caseworker's) goals, or whether the caseworker is assisting in the finding of the client's goals. Since I believe the to-infinitive should prefer the "in order to" interpretation, it doesn't fit what your sentence actually means.
I'll also add that "in identifying her goals" might be preferable to "finding her goals". Finding is a bit too literal for something as abstract as a personal goal.
Comment: While this answer is certainly valuable, ELU prefers answers that provide some supporting evidence (I was only able to find online examples used by reasonably authoritative looking bodies) for usages.
Answer: It is not too easy to find a (linguistic) authority that licenses these.
[1] Age UK

... when ... supporting individuals you need to .... support
  them with this.

and
Agency Government Jobs.com/olmsted

... and support them with carrying out treatment plans ...

use the 'support N1 with N2 / ing-form' usage.
...........
[2] CIS Assessment.co.uk

you will support them in what they believe is ...

and
the RSPH

... support them in carrying out an NHS Health Check assessment.

use the 'support N1 with N2 / ing-form' usage.
...........
[3] And the NHS has an example of the "support N to V" usage:

... with an independent advocate who will support them to make
  decisions ...

........
This is not to say that each choice is equally appropriate in every situation. As another answer says, ambiguities are possible (with to- and with- variants especially) and should be avoided.
Answer:
The case worker supports the client with goal setting [OR: in setting goals].

If you get tired of setting goals (in a long document, for example), you could articulate them.

Support with, in, or to?


Why is mAP (mean Average Precision) used for instance segmentation tasks?

Question: I understand why this metric is good for object detection tasks but for instance segmentation tasks it does not give any clue about the quality of the predicted masks.
Shouldn't it be combined in some way with IOU between predicted and ground truth masks like  it is done for semantic segmentation with mIOU ?
Answer: Key takeaway: modern datasets and instance segmentations use pixel-wise IOU for instance to instance overlap calculations during matching, essentially as you suggest above.

mIOU gives average intersection over union across all segmentation
classes in a semantic segmentation problem, giving all classes equal
weight importance.
mAP gives average accuracy of predicted object locations across all
object predictions, matched to ground truth object predictions, and giving each object equal importance. (with a few caveats.
First off, it is normally done separately per class so you get an mAP
value for each class, and secondly, mAP is done using bounding boxes
with a set threshold of overlap to be considered a match, though
theoretically could be done with pixel-wise IoU for a finer
analysis).

Reasons to use mAP:

If you have class imbalance where most of the instances belong to a single class, minority classes would be underweighted using mIOU, whereas mAP counts on a per object basis.
EDIT ADDITION: While most evaluation challenges use class-balanced mAP, for your own training and evaluation you may not want to give each class equal importance in scoring because this will heavily weight classes with fewer examples. mAP can be used without equal class weighting, in which case each object will be given equal importance. If mIOU without class averaging were used instead of mAP, each pixel would be given the same importance. In many cases the latter may not be a desirable effect (e.g. one object class is generally larger, so would thus be given more weight by the metric).
Instance segmentations are often subsequently used for object detection tasks (as in Mask RCNN Paper), and in these cases it is nice to have a metric to compute their accuracy on this subsequent task. In the early days of instance segmentation (5 or so years ago) there likely weren't many datasets with instance segmentation labels so comparing against bounding box ground truth labels was more esesential.

Now, to get to the main answer to your question, the only difference between mAP for object detection and instance segmentation is that when calculating overlaps between predictions and ground truths, one uses the pixel-wise IOU rather than bounding box IOU. Recent instance segmentation papers have used this pixel-wise IOU rather than bounding box IOU (see this paper). You'd have to look at specific datasets and benchmarks to see which form of mAP they use for evaluation.
Comment: Thank you for your complete answer ! Something is still not very clear to me. You said that mAP could be useful to mitigate class imbalance. However, I thought mAP meant "mean Average Precision" because it was the mean over all classes. A simple mean gives the same weight for all classes, under or over represented doesn't it ?
Comment: Edited original answer to address this, comment if that doesn't really help. In the case where mAP is not averaged across all classes, the "mean" denotes mean over all objects, not classes.
Answer: to calulate MAP, you firstly need to compute IOU.

for instance segmentation, IOU compute pixel to pixel
for object detection, IOU compute box to box

so, i think that the method of computing IOU is the most significant difference.


Why queuable apex accepts sobjects where as future methods doesn't?

Question: I was going through asynchronous apex and reading it made me confused at one point. In future methods, we cannot pass sojects for reasons future methods being executed at a later point of time, by the time it is executed the sboject data could be stale. But, at the same time, the more advanced queuable apex accepts sobjects. Why is it so? The same reason is applicable for queuable apex also right? kindly clarify.
Answer: Batchable, future, and queueable were basically three versions of the same feature request from customers. Initially, customers wanted a way to process bulk data asynchronously. We were given Batchable. Customers then complained that while batchable was great for mass processing, it was too "bulky" when all you wanted was simple asynchronous method calls, so we were given future.
Compared to batchable, you didn't need a separate top-level class, you didn't need to construct an object, you could use it up to 50 times per transaction, and you didn't need to call a special method to invoke it. However, it was also simplified, as you no longer received a "job Id", and you couldn't pass in complex object graphs (which improved efficiency and code design).
Queueable methods were implemented last, and became a hybrid of the two features, offering the ability to monitor jobs and handle complex objects, but without the overhead of Batchable, which required three asynchronous methods to process just a single record, which was why future methods were invented to begin with.
So basically, future methods can't handle them because customers of the time wanted a more lightweight asynchronous feature, and future was designed to address those needs in a way that allowed the best performance.
Answer: The possibility of data going stale is not why future methods do not accept sObject parameters. Id values are future-compatible primitives and can also be stale, if, for example, the record is deleted prior to executing the future method.
All asynchronous code must be concerned about the validity of the data it is passed relative to the current state of the database. This is true across Batch, Queueable, and Scheduled Apex, and for future methods. There's no difference in that concern across all types of asynchronous processing in Salesforce (or, indeed, in other development environments).
Future methods and Queueable Apex simply are different implementations with different capabilities, future being rather older. Neither shields you against changes to the database state between enqueuing and execution, and the difference in accepted parameters isn't due to a difference in that respect.
Comment: That was a good explanation @david. Thank you.
Comment: Still confused with How salesforce handles the sobjects in queueable class.how it does it internally.
Comment: @Gourishankar If you have a separate question, please open a new post.
Answer: There are 2 kinds of Integrations.
1) That wants to know what was the State of the records at a given point in time when DML/Operation happened. When a transaction happened what is the state of the records, we need to sync it to the external system.
2) That wants to know what was the latest state of the record. It doesn't not matter how many updates have happened , when sending data to external system, we want latest data.
Back when there was no Queuable, for 1st type of Integration, people used to Serialize Sobjects into JSON string and pass it to the future method and do callout.
SF realized this is a proper use case, and started supported Passing of complex objects natively, now its upto devs to decide if they wanna query data or use serialized sobject data passed to Queueable.


How to determine the efficiency of intermolecular charge transfer?

Question: Lets say we have 2 molecules: A and B. Both of these molecules associate with another molecule C. Upon association two complexes form A-C and B-C. We can experimentally see that upon association a new charge transfer (CT) absorption band appears, additionally intensive CT emission appears. Additional evidence for CT can be obtained by DFT calculations (where HOMO is located on A or B and LUMO is located on C). By determining photo luminescence quantum yields (PLQY) it can be seen that A-C has 4 times higher PLQY than B-C.
Are there any ways to determine whether specifically the efficiency of the CT is responsible for this drop of PLQY?
Comment: Do you mean that the fluorescence yield of C is reduced in BC vs AC ?
Answer:

Indeed, if both complex A-C and complex B-C experience CT emission, the efficiency of CT character present in the complexes may be responsible for the difference in PLQY. This however, will be the case if there is no reverse in CT polarity (for example if in both complexes C is the acceptor (and emitter), this may also the reason for porphyrin's comment). Hence if the criteria above are met and You should generally observe the same (or highly similar) emission from both of the complexes. That would also indicate that one species is responsible for the observed emission.

Calculating efficiency of CT. Although I have not seen extensive literature about CT efficiency, there are few papers which try to quantify the CT. The best example I could find is available here: https://onlinelibrary.wiley.com/doi/full/10.1002/jcc.24822. In that paper the authors are trying to quantify CT within a single molecule. Technically the same methodology should also apply for the intermolecular CT in A-C and B-C. Complaring the values obtained should provide some insight in the CT character between both species. Importantly, to do this calculation You need to know exactly how the complex looks. One way to obtain their geometry is to obtain X-Ray single crystal diffraction representations of A-C and B-C in the solid state (this however works only if A-C and B-C do not dissociate upon crystallization).

Godspeed.


Oracle tables with > 10B rows

Question: What's your experience with querying Oracle tables with >10B rows? The tables are well partitioned
Can this be done using "noraml" machines (clustered) or - does it require a gigantic machine?
Thanks!
Answer: The number of rows is not in itself an issue. Whether the system meets specification or not is also determined by the data access patterns, storage performance (usually woefully undersized), number of sessions accessing it, presence of precalculated summaries etc.
So, I would not say that special hardware is necessarily required.
Answer: Assuming that the table is partitioned and the queries specify the partition key, the size of the table is irrelevant.  The only thing you would care about is the size of the partition(s) that need to be scanned in order to execute the query.  That would normally be just one or two partitions which you should be able to do with minimal amounts of hardware resources.
Of course, if you have 10 billion rows of data, that generally implies that you have a data warehouse for a relatively large company  which is the bigger issue.  Large companies have large numbers of employees that want to be able to report against the data warehouse.  They have large numbers of canned reports that need to hit the data warehouse.  They have a large number of data feeds.  They have a large number of data marts that need to be populated.  They have relatively short load windows.  These requirements drive the need for more hardware and, on occasion, the need for specialized hardware like an Exadata box.
Comment: Thanks Justin. However - got to say that this is not the case ... I expect no more than 20-30 concurrent users, ~60 pre-defined reports (no option to build your own reports) etc

Oracle tables with > 10B rows


Modal Window on Full Page instead of Div

Question:
I have a situation where Modal window is opening on clicking calendar event in each div only. I want to open the events in full page modal window instead.How can i do this. I am using Sharepoint 2010.
Comment: Means,.. do you want to open full Calendar List View on Modal Dialog ?
Comment: I want that if i click on an event in any calendar, i want the modal dialog to open in full modal dialog instead of opening in that particular div.
Comment: BTW, is below answer helps you?
Answer: By your given image, I predict that you are working with multiple iFrames on the page (your DIVs behave like it).
iFrame itself is full page where you can display the another page's content in it. When you are opening the Modal Dialog in it than it will bind to that particular iFrame only.
You can achieve it by handling the event of the link of event in calendar & open it by code without the parameter called isDlg=1 in the URL.
Comment: isDlg=1 is the parameter indeed. I believe you have 2 options. 1. Try to change the new/edit form settings inside list settings where you can disable the modal option. 2. DIRTY option would be write Jquery to get all the links in the calendar container & alter their href to remove the parameter


How to sychronize bookmarks with Microsoft Edge?

Question: Currently I am using XMarks to sync all my bookmarks between work and home and also the browsers Chrome, Firefox and Internet Explorer. This works as intended. Now I want to start using Edge. I can import from Internet Explorer and have my favorites now in Edge. But when I add a new favorite to Edge this will not be synced back to the other browsers. Any solution for this?
Comment: As of today (the first of January 2016), there is no solution. Microsoft is feverishly adding features to all areas of Windows 10, and is slated to add support for extensions in early 2016. [Xmarks will have an extension ready soon after](https://buy.xmarks.com/support.php?cmd=showfaq&id=9292). Until then, a work-around is to set your Edge home page to display your Xmarks bookmarks page: https://my.xmarks.com
Comment: Did this ever happen? I hear there is an insider build with this feature, but it's really off the mark with how long its taking to easily integrate this feature.
Answer: This may be old news by now, but here's how I've accomplished it:
(I'm not sure if the first step is required, but it can't hurt.)
1) From the Notification button (LR corner) > All settings > Accounts > Sync your settings: Switch on the Internet Explorer Settings and whatever other Windows items you want to auto-sync.
2) (Windows key + R) > gpedit.msc
3) In the left pane, Computer Configuration > Administrative Templates > Windows Components > Microsoft Edge
4) In the right pane, double-click on Keep favorites in sync between Internet Explorer and Microsoft Edge
5) Select Enabled, click OK, close the editor
Not sure if a reboot is required, but I did and it took a few minutes before IE and Edge were synced.  Favorites added and/or deleted from either IE or Edge will now auto-sync.  XMarks will continue to sync between Chrome, Firefox and IE, while the Group Policy will keep IE and Edge in sync, making all four synced.


Using multi-level numbering in a form

Question: I have a long form that I am designing with approximately 30 fields. The form is divided into 3 expand/collapsible sections. I would like to know what the community here thinks about using multi-level numbering for the form field labels. Do you think it would support/impede usability?
I am providing an example below:
Answer: A better solution is to create a multi-step form with a progress bar above or below the form where you present the user how much left they have to fill. This has several advantages including:

the user will not be overwhelmed by how much they have to fill (which is, by the way, the #1 reason why users abandon forms)
if something happens and the page refreshes, previous progress won't get lost

Using multi-level numbering in a form


Why are alkanes also called paraffins?

Question: Why are alkanes also called as paraffins?   Is it because they are mainly found from petroleum and natural gas?
Comment: I don't have concrete proof for this, but as my teacher said it is because it has a wax like texture.
Answer: The origin of the word is historical, and has to do with the observed properties of the class of hydrocarbons we know refer to as alkanes. The name originated in the Latin for "little affinity."
From M. P. Crosland's text Historical Studies in the Language of Chemistry:

The term paraffin was coined by Reichenbach (from Lat. parum + affinis = little affinity) to denote a particular substance, a mixture of hydrocarbons (Journal fur Chemie und Physik, 59 (1830), 455). The term was extended to cover any hydrocarbons of the series $\ce{C_{\rm n}H_{\rm 2n + 2}}$ by Watts (Dictionary of Chemistry, 1868, vol. iv, p. 344 and Supplement, 1872, p. 705).

Reichenbach, referred to above, is Carl Reichenbach, a multifaceted scientist who did pioneering work in isolating (and thus naming) hydrocarbons in the early 1830's.
Answer: As already noted in Todd Minehardt's answer, the name "paraffin" is based on the Latin words parum + affinis = "little affinity".
The "little affinity" behind their Latin name referring to their relatively low reactivity. They have "little affinity" for other elements or compounds and a consideration of their chemical structure will make you see why.
Comment: Well, it's not a great answer, and it's certainly not an *expansion* of anything. But it's not VLQ IMO.
Comment: I can see semantics is more important than assistance here. This was a simple development of an answer already given, using facts that perhaps should have been included in the first place for clarity. The questioner must be perplexed at these developments and I - as a very experienced educationalist who thought your site was an excellent idea and opportunity to help - certainly am. Rest assured I shall not trouble you or the site further.
Answer: Petrol is a word which refers a combination of all hydrocarbons in that major part is paraffins (alkanes)(as the chemical structure shows that all the single bonded joins are called as alkanes). So paraffins are also called as alkanes. But the fact tell us (any of the series of saturated hydrocarbons including methane, ethane, propane, and higher members.)
Answer: Since alkanes are saturated, their reactivity seems to be less, hence the name parafin due to less affinity.
Answer: Paraffins means little reactive and alkanes are little rective due to presence of single bond. Therefore  they are also called paraffins
Comment: A rehash offering nothing novel to the answers already present.

Why are alkanes also called paraffins?


Precedents of student affair/DEI providing input in faculty hiring, promotion, and evaluation?

Question: Has there been any examples of office of student affairs or office of Diversity Equity and Inclusion (DEI) or equivalent offices in university administrations providing (direct and nontrivial) input in the hiring, evaluation, and promotion of (academic) faculty?
Comment: Probably not in individual cases. But they might be involved in setting policy.
Comment: Hard to prove that there never has been. One can easily imagine the office of student affairs bringing up cases where a promotion candidate has not followed university policy, particularly if they were found in the wrong and punished in some way.
Comment: I agree with @Buffy. In the University of California system for example, contributions to diversity are taken into account (at least to some extent) in promotion and hiring decisions in all cases following standard university policy. That policy was no doubt conceived with assistance from the types of offices you're asking about. But I'm not aware of a more direct type of influence.
Comment: I meant to type *precedents*. I'm not aware of any current examples, so it's mainly a question of existence of such practice. *Prevalence* would work too.
Comment: Search in U. California system, specifically, UC Berkeley,UCLA,  Cal State Universities. If there were examples, there were in CA.
Answer: There are usually rare cases of just about everything. However:
An office of diversity would most likely be involved in setting policy that other parts of the university must adhere to. But, in the US, at least, those are unlikely to affect individual cases other than at the margin. Diversity is still a difficult problem that has few answers, partly because it is contentious. (I have no experience outside the US.)
The office of student affairs will often collect complaints from students. Those that can't be handled immediately will probably be passed on to other administrators that have direct responsibility for faculty. So, enough complaints, forwarded to the department chair might well have an effect on tenure or promotion, but it would be more likely to be other than direct involvement by student affairs.

While the above is a view of what happens officially, who can say what goes on in private meetings. A faculty member with a sufficiently bad reputation that reflects badly on the university, might be handled sub-rosa.
Comment: Policy has some influence. We also have to go through a DEI training to be on a search committee. I have definitely seen committee members incorporate what they learned into their hiring.
Comment: @Dawn. one would hope that policy has some influence.
Comment: Having an affair with a student likely will impact promotion in many places...