I have a package that contains two classes. Private variable share is located in class A and that variable can be accessed only by these two classes, A and B, and can't be accessed by importing the package. Is it possible to achieve this?  // A.java     class A {     private static String share;  }  // B.java class B {     public String myMethode() {         // do something with share     } }
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?
deals with various ways of rewarding the finding of duplicates, a tough and increasingly necessary janitorial task.  Here's a concrete suggestion:   Reward the finder of a duplicate with +10 points if the question gets closed as a dupe. If multiple duplicates are found, reward all finders whose suggestion was voted for at least once by another user. (The limitation is to avoid gaming by making frivolous suggestions when it's obvious that a question is going to get closed as a duplicate.) Reward each following closevoter who picks one of the previously suggested dupes with +2 points if the question gets closed. Punish everyone involved (dupe-finders and dupe-voters) with -5 points, and revoke all rep gained from the dupe-voting, if a question closed as duplicate gets reopened.   A punishment for mis-voting is going to be controversial but in my eyes, it is absolutely essential. Finding a good dupe is a work of love: You need to make sure you understand the OP's question, and you need to scan every potential duplicate for whether it really contains an answer that will help the OP. Everyone dupe-votes carelessly from time to time, so the threat of punishment needs to be present to keep everyone on their toes, just as the threat of downvoting does when you post an answer.  If you think +10 is too high a reward: Consider that finding a duplicate can often be more work than writing an answer, and a correct answer usually nets you at least 10 points, if not much more.   If you think -5 is too much of a punishment: -2 might work as well, although I really think there should be a harsh punishment on an unfair dupe-closing. I had just arrived at the hotel, checked in and gotten into my room. Just as I was about to unpack, I noticed that one of my bags was missing. At first I thought I had left it back at the airport, but it turned out that I had left it on the taxi.  Here, what's the meaning and role of "just"?  Why do you guys input the word "just" here?  What exactly does the word do grammatically?   Could you help me? How to find out what init mode system is using? I was looking at this and I'm not sure how to find out which startup service is used on my machine (Ubuntu 14.04 on Digital Ocean). Can it use all of them? (upstart, system v, systemd) VMware Linux Server -- how can you tell if you are a vm or real hardware? An interesting question.  I have logged into a Linux (most likely SuSE) host.  Is there some way that I can tell programmatically that I am a VM host or not?    Also assume that the vmtools are not installed. Combine two columns into a list of all possible combinations of entries I have two columns such as:  a   1  b   2  c    and I need to combine them like:  a   1 a   2 b   1 b   2 c   1 c   2   Is it possible with a formula? What is the right ffmpeg output format for a v4l2-loopback device? Following the guide in  I did:  $ sudo modprobe v4l2loopback $ ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0   The device /dev/video0 shows up as expected but the ffmpeg command fails with following output:  $ ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0 ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers ... [x11grab @ 0x559767794cc0] Stream #0: not enough frames to estimate rate; consider increasing probesize .... [v4l2 @ 0x55976779e6c0] ioctl(VIDIOC_G_FMT): Invalid argument Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:0 --  Conversion failed!   I already tried to follow the suggestions below the answer to no avail. I noticed that v4l2 is listed as demux only in ffmpeg -formats. Does that mean I can't use it for output to /dev/video0? If so, what should I use instead? I tried h264 but that crashes after ~1000 frames with following error message:  $ ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f h264 /dev/video0 ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers ... [x11grab @ 0x55da61e29cc0] Stream #0: not enough frames to estimate rate; consider increasing probesize ... File '/dev/video0' already exists. Overwrite ? [y/N] y .... Error writing trailer of /dev/video0: Invalid argument .... Conversion failed! "At the time" versus "at that time" How do function pointers in C work? I'm looking to generate a set of 5 random variables and enforce a dependence structure between them and onto a dependent variable $Y$.  I understand how to generate correlated random variables for multivariate normal, but not when mixing different types.  Below is a little more than I need, but I'm hoping someone can give me a general way of solving this problem...   $X_1$ and $X_2$ need to be highly correlated Bernoulli variables.  $X_3$ needs to take one of 5 categorical values, call them "A"..."E".  $X_4$ needs to be normal, and negatively correlated with $X_1$, $X_2$.  $X_5$ needs to approximate test scores from $0$ to $100$ with a high skew, so gamma probably.  $X_5$ needs to be positively correlated with $X_1$, $X_2$, $X_4$.   Each of these variables must impact a "success/occurrence" Bernoulli distributed variable $Y$.  How would I begin?  I would like to enforce correlation both between the values of $X$, and also between each $X$ and $Y$.  (The categorical correlations seem particularly confusing to me.) blink code(escape code) has been removed? Proof $1+2+3+4+\cdots+n = \frac{n\times(n+1)}2$ Why no ooVoo on ubuntu? This might be subjective, I don't know. However, it's a serious problem for me. My electrical bill is outrageous. It's three times as large as my next-door neighbor, and four or five times the size of my neighbor's across the street. It's worse in the summer (I live in central TX), but I've had the air conditioner inspected, and while the house is right at the maximum capacity for our unit, the unit should still be able to take care of the load. That also doesn't explain why our winter bills are larger than the comparables.  What I would like to do is check the amount of current drawn by each running appliance and calculate where all my money is going. I just don't know how to go about doing this. Show that a group of order $180$ is not simple. It's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference? Calculation of $\lim_{n\to \infty}\prod_{r=1}^{n} \left(1+\frac{r}{n}\right)^{\frac{1}{n}}$ Calculation of  $\displaystyle \lim_{n\to \infty}\prod_{r=1}^{n} \left(1+\frac{r}{n}\right)^{\frac{1}{n}}$  $\bf{My\; Solution::}$  Let $y=\displaystyle \lim_{n\to \infty}\prod_{r=1}^{n} \left(1+\frac{r}{n}\right)^{\frac{1}{n}}$, Now taking $\log_{e}$ on both side  $\displaystyle \log_{e}(y) = \lim_{n\to \infty}\log_{e}\left(\prod_{r=1}^{n} \left(1+\frac{r}{n}\right)^{\frac{1}{n}}\right)=\lim_{n\to \infty}\frac{1}{n}\cdot \sum_{r=1}^{n}\log\left(1+\frac{r}{n}\right)$  Now Using Reinman Sum of Integral ...  $\displaystyle \log_{e}(y) = \lim_{n\to\infty}\frac{1}{n}\cdot \sum_{r=1}^{n}\log\left(1+\frac{r}{n}\right) = \int_{0}^{1}\ln(1+x)dx = \log_{e}(4)-\log_{e}(e) = \log_{e}\left(\frac{4}{e}\right)$  So $\displaystyle y =\lim_{n\to \infty}\prod_{r=1}^{n} \left(1+\frac{r}{n}\right)^{\frac{1}{n}} =\frac{4}{e}$  But how can i solve above question using Stirling Approximation,  May I ask for help?  Thank you in advance! Inaccurate reputation graphs - bug or as designed? I have notice two issues with the reputation graph: 1: This user has a higher score on the graph than in reality I happened to notice  where the user's graph reputation does not match their actual reputation.  The person in question was hit by a -100 penalty for an offensive answer a while back, but the graph doesn't reflect that.  I thought it just didn't update when I noticed this at the time, but the person has since gained and lost reputation and at all times the graph was +100 of their actual reputation.  It seems, based on Shadow Wizard's comment that this is because the reputation change is non-public. OK, fair enough... , which was marked as , noticed a similar phenomenon for placed DVs.  This prompted me to examine graphs more carefully.  It seems that this hidden -1 has been updated, as I checked several users and did not find any others that had lower actual reputation than graph reputation, so .  (Since the number of DVs placed is public, I can be reasonable sure that these users have placed -1 rep DVs, although strictly speaking they could be 100% question DVs.) 2: Some users have a lower score on the graph than in reality I did, however, find many users where the graph says their reputation is much lower than it actually is.  Perhaps that is from deleted downvotes turning into hidden +1s, but those should be balanced by hidden -1s, so its not clear what happened.  Seems there is some error in the logic - maybe the -1s do affect the graph now as per the , but the corresponding +1s don't?  Whatever the case, I can't imagine it is intentional. Edit: I went back to find some examples today &amp; didn't find any.  I think the issue has been resolved - either it was a caching issue or a change was made to the code after this post. I heard myself saying something was "tickety-boo", meaning good, successful, or satisfactory. Does anyone know where this strange-sounding phrase originated? I am using the 2D Animation preset and so far every new scene I made had the same bright white background. Now my two latest scenes (created with 'copy settings') have a light grey background even though they are set to white. There's also no difference in surface, nodes or strength.  There are apparently exist different background shades with an off-white color but selecting the white one doesn't help either What software do you use to accurately draw geometry diagrams?