I would like the Stack Exchange sites to provide a way for members to respectfully agree or disagree with the closing of a question, particularly if it is marked as "off topic" or "duplicate". Over the years I have obtained a great deal of very useful information from questions that are closed, and in most of those cases I disagree with the decision to close it. I believe this will benefit the Stack Exchange communities in two important ways:   The body of subject matter that is deemed "on topic" is controlled by a very small group of elite members. Considering (a) the number of upvotes on closed questions, and (b) the number of closed questions that appear as top-ranking results in Google searches, it seems evident that the communities using these sites do not entirely share the views of the elite. The upvote/downvote on question closure would allow the community to respectfully participate in defining the bounds of subject matter for each Stack Exchange site. The definition of "duplicate" is much more subjective than its boolean nature suggests. From one person's perspective, two similar questions may seem incontrovertibly identical, because that person finds no additional value in the subtle differences between them. But a second person may find those same two questions to be distinct in some important way, for example if one of the questions emphasizes an aspect of the issue that the other does not (and contains helpful points on that aspect). These subtle distinctions may be difficult for a moderator to see, especially since the moderator is not reading the question with the goal of solving a problem.    If this feature were implemented, it might be prudent to restrict the new upvote/downvote on question closure to members with a certain reputation level, since newer members may not have enough experience in the community to understand its values and goals. The moderators can still have the final say about closing questions, but should be notified when any of their closures has received a very large number of contradictory downvotes. They can still say "well people just don't get it," but at least they should know that the community strongly favors a different perspective.
I propose to let users vote on closing activities of moderators and other users with closevoting power.  Like this:       closed as exact duplicate by Michael Mrozek, waiwai933, Arjan, YOU, Yi Jiang 6 hours ago      This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.   Make it like this:     closed as exact duplicate by Michael Mrozek, waiwai933, Arjan, YOU, Yi Jiang 6 hours ago   fair/unfair close? [agree] [disagree]      This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.   Then the system will gather statistics and automatically grant more closing powers to those users who enjoy support of the community and revoke those powers from those mostly casting contradictory votes.  It would seem that granting the same powers to everybody has not resulted in balance but in public disorder. Perhaps it is reflective of American lifestyle (everybody has the right and means to shoot anybody), but it's not the best way to run a society by far.  What I'm trying to say is that while granting powers to everybody in advance is generous, the maturity to wheel these powers in a fair way must be proven. By introducing community feedback this assessment process can be automatized.
I'm making a Java application with an application-logic-thread and a database-access-thread. Both of them persist for the entire lifetime of the application and both need to be running at the same time (one talks to the server, one talks to the user; when the app is fully started, I need both of them to work).  However, on startup, I need to make sure that initially the app thread waits until the db thread is ready (currently determined by polling a custom method dbthread.isReady()). I wouldn't mind if app thread blocks until the db thread was ready.  Thread.join() doesn't look like a solution - the db thread only exits at app shutdown.  while (!dbthread.isReady()) {} kind of works, but the empty loop consumes a lot of processor cycles.  Any other ideas? Thanks. How to find the limit of a sequence? Question:  If $0 &lt; x &lt; \frac{\pi}{2}$ and $f_k(x) = \tan(x)+\frac{1}{2}\tan(x/2)+ ...+\frac{1}{2^k}\tan(x/2^k)$.  In Sigma Notation: $$f_k(x) = \sum_{n=0}^k \frac{1}{2^n}\tan\frac{x}{2^n}$$  Find $$\lim_{k\to \infty}f_k(x)$$  I'm not quite sure how to take the limit of a sequence, I've never seen this before, If someone could help me solve this it would be greatly appreciated. How to adjust the gap between figure and caption within the same subfloat My question is:  How to adjust the gap between figure and caption within the same subfloat  Not the gap between two subfloat.  For the following example:  \begin{figure}     \centering     \subfloat[A]{\includegraphics[ scale=0.5]{images/a.jpg}}     \vspace{-10pt}     \subfloat[B]{\includegraphics[scale=0.5]{images/b.jpg}}     \vspace{-10pt}     \caption{}\label{fig:online_test} \end{figure}   I got the following figure:    The sub-caption of (a) is too close to the sub-figure B. I hope the caption (a) to stay closer to sub-figure A. How can I adjust the space between the caption and figure within a subfloat?  Thank you all for helping me and I would prefer a solution for subfloat, instead of using other packages. But I would also appreciate a solution of using other packages.   I know my question looks similar to . But please make it clear. I'm asking for how to adjust the gap between figure and caption within a subfloat, not the gap between two subfloat. That is, the gap between the caption "a" and the figure "A"  Thank you. In CSS what is the difference between "." and "#" when declaring a set of styles? What is the difference between # and . when declaring a set of styles for an element and what are the semantics that come into play when deciding which one to use? Steps to Reproduce   Tap faster on the code. or Tap once on a huge code.   but happens only when  setupForGeneric() is called, might be a bug related to   private void setupForCode()   { String str = getIntent().getStringExtra("com.stackexchange.marvin:code_block"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.setPostBody("&lt;pre&gt;&lt;code&gt;" + TextUtils.htmlEncode(str) + "&lt;/pre&gt;&lt;/code&gt;", false); localPrettyWebView.setBackgroundColor("#eeeeee"); }  private void setupForGeneric() { String str = getIntent().getStringExtra("com.stackexchange.marvin:web_url"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.getSettings().setBuiltInZoomControls(true); localPrettyWebView.getSettings().setLoadWithOverviewMode(true); localPrettyWebView.getSettings().setUseWideViewPort(true); localPrettyWebView.loadUrl(str); localPrettyWebView.setBackgroundColor("#eeeeee"); }   Log  09-05 03:54:30.312: E/AndroidRuntime(26264): FATAL EXCEPTION: WebViewCoreThread  09-05 03:09:39.522: E/Crittercism(18318): java.lang.NullPointerException: [v0.1.22]  09-05 03:09:39.522: E/Crittercism(18318):   at android.content.ComponentName.&lt;init&gt;(ComponentName.java:75) 09-05 03:09:39.522: E/Crittercism(18318):   at android.content.Intent.&lt;init&gt;(Intent.java:3156) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.ViewPopupActivity.showCode(ViewPopupActivity.java:25) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.question.QuestionFragment$1.onCodeClicked(QuestionFragment.java:67) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.common.PrettyWebView$WebAppInterface.codeClicked(PrettyWebView.java:197) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.access$4000(WebViewCore.java:59) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1449) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Handler.dispatchMessage(Handler.java:99) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Looper.loop(Looper.java:137) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:790) 09-05 03:09:39.522: E/Crittercism(18318):   at java.lang.Thread.run(Thread.java:856) Ball to Ball Collision - Detection and Handling With the help of the Stack Overflow community I've written a pretty basic-but fun physics simulator.    You click and drag the mouse to launch a ball.  It will bounce around and eventually stop on the "floor".  My next big feature I want to add in is ball to ball collision.  The ball's movement is broken up into a x and y speed vector.  I have gravity (small reduction of the y vector each step), I have friction (small reduction of both vectors each collision with a wall). The balls honestly move around in a surprisingly realistic way.  I guess my question has two parts:   What is the best method to detect ball to ball collision? Do I just have an O(n^2) loop that iterates over each ball and checks every other ball to see if it's radius overlaps? What equations do I use to handle the ball to ball collisions? Physics 101 How does it effect the two balls speed x/y vectors?  What is the resulting direction the two balls head off in?  How do I apply this to each ball?     Handling the collision detection of the "walls" and the resulting vector changes were easy but I see more complications with ball-ball collisions.  With walls I simply had to take the negative of the appropriate x or y vector and off it would go in the correct direction.  With balls I don't think it is that way.  Some quick clarifications: for simplicity I'm ok with a perfectly elastic collision for now, also all my balls have the same mass right now, but I might change that in the future.    Edit: Resources I have found useful  2d Ball physics with vectors:  2d Ball collision detection example:     Success!  I have the ball collision detection and response working great!  Relevant code:  Collision Detection:  for (int i = 0; i &lt; ballCount; i++)   {       for (int j = i + 1; j &lt; ballCount; j++)       {           if (balls[i].colliding(balls[j]))           {             balls[i].resolveCollision(balls[j]);         }     } }   This will check for collisions between every ball but skip redundant checks (if you have to check if ball 1 collides with ball 2 then you don't need to check if ball 2 collides with ball 1.  Also, it skips checking for collisions with itself).  Then, in my ball class I have my colliding() and resolveCollision() methods:  public boolean colliding(Ball ball) {     float xd = position.getX() - ball.position.getX();     float yd = position.getY() - ball.position.getY();      float sumRadius = getRadius() + ball.getRadius();     float sqrRadius = sumRadius * sumRadius;      float distSqr = (xd * xd) + (yd * yd);      if (distSqr &lt;= sqrRadius)     {         return true;     }      return false; }  public void resolveCollision(Ball ball) {     // get the mtd     Vector2d delta = (position.subtract(ball.position));     float d = delta.getLength();     // minimum translation distance to push balls apart after intersecting     Vector2d mtd = delta.multiply(((getRadius() + ball.getRadius())-d)/d);        // resolve intersection --     // inverse mass quantities     float im1 = 1 / getMass();      float im2 = 1 / ball.getMass();      // push-pull them apart based off their mass     position = position.add(mtd.multiply(im1 / (im1 + im2)));     ball.position = ball.position.subtract(mtd.multiply(im2 / (im1 + im2)));      // impact speed     Vector2d v = (this.velocity.subtract(ball.velocity));     float vn = v.dot(mtd.normalize());      // sphere intersecting but moving away from each other already     if (vn &gt; 0.0f) return;      // collision impulse     float i = (-(1.0f + Constants.restitution) * vn) / (im1 + im2);     Vector2d impulse = mtd.normalize().multiply(i);      // change in momentum     this.velocity = this.velocity.add(impulse.multiply(im1));     ball.velocity = ball.velocity.subtract(impulse.multiply(im2));  }   Source Code:     If anyone has some suggestions for how to improve this basic physics simulator let me know!  One thing I have yet to add is angular momentum so the balls will roll more realistically.  Any other suggestions?  Leave a comment! Induction proof: n lines in a plane Assume that there are $n$ infinitely long straight lines lying on a plane in such a way that no two lines are parallel, and no three lines intersect at a single point. Prove that these lines divide the plane into $\frac{n^2+n+2}{2}$ regions. (Hint: Any two non-parallel straight lines on a plane must intersect at exactly one point.)  Can someone tell me where to start here? I know to prove the base where $n=0$, but don't know how to proceed.  Any help is greatly appreciated! The Public Platform team is continuing to work towards  and we’re here today to announce a new onboarding experience for the review queues. In the  (), we learned that each queues’ instructions could be easily misinterpreted and additional information was difficult to find. Without proper guidance or context, new reviewers would contribute inconsistent reviews and risk having their review privileges suspended. With this release, our goals were to 1) better highlight the review privilege and 2) provide upfront instruction and guidance for successful reviewing. New privilege announcements Community moderation is a significant aspect of Stack Overflow and the Stack Exchange sites. We want users to be aware and familiar with this newly earned privilege, but also celebrate the opportunity to contribute to the community in a unique way.  Many users were discovering the review queues by chance. Once the privilege is earned, a new review queue icon with a red alert would appear in the top-right part of the navigation. We are adding a popover to bring more attention to this easy-to-miss icon. We will also be adding notices for when users earn access to other, higher reputation queues. Additionally, new reviewers will also receive an email notification about the newly earned privilege. They will only get the email if they earn the privilege and don't perform a review within 24 hours (anyone who doesn't want to receive email notifications like this can visit their  and turn off &quot;Tips and Reminders&quot;). We are also showing a popover to users who earned access to review queues in the past, but have never done a review or haven't reviewed in the last 30 days. This popover is only appearing for the next 90 days. The goal is to engage users who may not have interacted with the queues since we made  and . Welcome banner  If a reviewer clicks “Learn more” on the on-page popover or goes to the review queue home page (/review), they’ll be greeted with an onboarding message with general information about the review queues. Informational modals  Queue-specific modals will appear upon page load as you visit each queue. They summarize and highlight important aspects and tips about reviewing in a particular queue. This information can be revisited at any time by clicking “Learn more” under the page header. Feedback As always, please leave your feedback and any bugs you may discover related to this release below this post. We will be monitoring this post for the next few weeks (May 4, 2021). After May 4th, please report any further issues as new questions. Why can Naruto still use Rasenshuriken? Can a ring of positive characteristic have infinite number of elements? For curiosity: can a ring of positive characteristic ever have infinite number of distinct elements? (For example, in $\mathbb{Z}/7\mathbb{Z}$, there are really only seven elements.) We know that any field/ring of characterisitc zero must have infinite elements, but I am not sure what happens above. Fedora 25 and disabling whatever is listening on port 111 I've got a Fedora 25 x86_64 stand alone workstation. Something is listening on port 111 (identified with an nmap scan):  $ sudo lsof -i :111 COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME systemd   1 root   36u  IPv4  15170      0t0  TCP *:sunrpc (LISTEN) systemd   1 root   37u  IPv4  15171      0t0  UDP *:sunrpc systemd   1 root   38u  IPv6  15172      0t0  TCP *:sunrpc (LISTEN) systemd   1 root   39u  IPv6  15173      0t0  UDP *:sunrpc   I disabled the Sun gear on the port with the following commands:  $ sudo systemctl disable rpcbind $ sudo systemctl disable sunrpc Failed to disable unit: No such file or directory   After reboot the port is still open.  It appears something other than Sun gear wants to listen on port 111. Or maybe systemd is not respecting my wishes to disable the unused service. Or maybe something else...  How do I determine what is trying to listen on the port, and how do I disable it?    From below:  $ sudo systemctl -a | grep -E "rpc|port"   var-lib-nfs-rpc_pipefs.mount          loaded    active   mounted   RPC Pipe File System   abrtd.service                         loaded    active   running   ABRT Automated Bug Reporting Tool   auth-rpcgss-module.service            loaded    inactive dead      Kernel Module supporting RPCSEC_GSS   fedora-import-state.service           loaded    active   exited    Import network configuration from initramfs   fedora-readonly.service               loaded    active   exited    Configure read-only root support   rpc-gssd.service                      loaded    inactive dead      RPC security service for NFS client and server   rpc-statd-notify.service              loaded    inactive dead      Notify NFS peers of a restart   rpc-statd.service                     loaded    inactive dead      NFS status monitor for NFSv2/3 locking. ● rpc-svcgssd.service                   not-found inactive dead      rpc-svcgssd.service   rpcbind.service                       loaded    inactive dead      RPC Bind   rpcbind.socket                        loaded    active   listening RPCbind Server Activation Socket   rpc_pipefs.target                     loaded    active   active    rpc_pipefs.target   rpcbind.target                        loaded    active   active    RPC Port Mapper Why do we use residuals to test the assumptions on errors in regression? Suppose that we have a model $Y_i = \beta_0 + \beta_1X_{i1} + \beta_2X_{i2} + \dots + \beta_kX_{ik} + \epsilon_i$.  Regression has a number of assumptions, such as that the errors $\epsilon_i$ should be normally distributed with mean zero and constant variance. I have been taught to check these assumptions using a normal QQ plot to test for normality of the residuals $e_i = Y_i - \hat{Y}_i$ and a residuals vs. fitted plot to check that the residuals vary around zero with constant variance.  However, these tests are all on the residuals, not the errors.  From what I understand, the errors are defined as the deviation of each observation from their 'true' mean value. So, we can write $\epsilon_i = Y_i - \mathbb{E}[Y_i]$. These errors cannot be observed by us. *  My question is this: how good of a job do the residuals do in mimicking the errors?   If the assumptions appear to be satisfied on the residuals, does this mean they are satisfied on the errors too? Are there other (better) ways to test the assumptions, like fitting the model to a testing dataset and getting the residuals from there?    * Furthermore, does this not require that the model is specified correctly? That is, that the response really does have a relationship with the predictors $X_1, X_2,$ etc. in the way specified by the model.  If we are missing some predictors (say, $X_{k+1}\ \text{to}\ X_p$), then the expectation $\mathbb{E}[Y_i] = \beta_0 + \beta_1X_{i1} + \beta_2X_{i2} + \dots + \beta_kX_{ik}$ would not even be the true mean, and further analysis on an incorrect model seems pointless.  How do we check whether the model is a correct one? How can the Next Generation's unfamiliarity with the Borg be explained after Archer's encounter? In  Starfleet learns about a culture that we (as audience) know as The Borg. According to TNG, the Federation doesn't seem to know anything about these beings when . Although Archer's crew doesn't learn the name of the Borg, it would be reasonable that the Federation would inherit the information about such a menacing enemy and it would also be reasonable to assume the crew of the Enterprise-D to be able to match their encounter with their databases' information.  Obviously, out-of-universe the explanation is that the scripts weren't written in chronological order, but how can the apparent obliviousness about the Borg be explained in-universe? (This question is only as reference, I will add the answer myself)  Suddenly the search in the expl3 documentation interface3.pdf no longer works. As an example searching for "divis" gives this as the first hit:    In sumatra there is no problem, other files (e.g. source3.pdf) works fine. What could be the reason?) Macrons appear really wide on all characters, but especially so on the i. Is it possible to make them less wide?  \documentclass{article} \begin{document} Tac\=e, M\=arc\=o, \=unus, f\=\i li\=\i? \end{document} How to select html nodes by ID with jquery when the id contains a dot? If my html looked like this:  &lt;td class="controlCell"&gt;     &lt;input class="inputText" id="SearchBag.CompanyName" name="SearchBag.CompanyName" type="text" value="" /&gt; &lt;/td&gt;   How could I select #SearchBag.CompanyName with JQuery? I can't get it to work and I fear it's the dot that's breaking it all. The annoying thing is that renaming all my id's would be a lot of work, not to mention the loss in readability.  Note: Please let's not start talking about how tables are not made for lay-outing. I'm very aware of the  and try hard to use it as much as possible. How does Java calculate negative numbers? Q1: Does a DNS rule for *.domain.com match multi-level domain names? In other words, if I just set *.domain.com in my DNS records, will it match all of:  a.domain.com b.a.domain.com c.b.a.domain.com   as many levels deep as needed, with just that one wildcard DNS specifier?  We have a use case for multi-level DNS and I would like to confirm that we are doing the right thing in setting one wildcard DNS setting for the root domain.  Q2: will this work with round-robin DNS? How to change Power button shutdown action to run a script under systemd Dispatcher.BeginInvoke: Cannot convert lambda to System.Delegate