Is there any side effects for Runtime.getRuntime().gc()
When to Garbage Collect
getting Checkpoint VPN SSL Network Extender working in the command line The official Checkpoint out command line tool from CheckPoint, for setting up a SSL Network Extender VPN is not longer working from the Linux command line. It is also no longer actively supported by CheckPoint.  However, there is a promising  project, that tries to replicate the Java applet for authentication, that talks with the snx command line utility, called snxconnect.   I was trying to put snxconnect text utility to work in Debian Buster, doing:  sudo pip install snxvpn   and  export PYTHONHTTPSVERIFY=0 snxconnect -H checkpoint.hostname -U USER    However, it was mostly dying either with an HTTP error of:   HTTP/1.1 301 Moved Permanently:   or:  Got HTTP response: HTTP/1.1 302 Found   or:  Unexpected response, try again.   What to do about it?  PS. The EndPoint Security VPN official client is working well both in a Mac High Sierra and Windows 10 Pro. Tool to create text files from a template I have to regularly create 100+ text files from templates. I currently use an overly complicated shell script. I think there is a smarter way to handle this, but I don't know how.  I have a "database" :  # outputfile      template            data1   data2    data3 first.txt         $template_main      $text1  abcd     1234 second.txt        $template_main      $text2  efgh     5678 third.txt         $template_other     $text1  ij       90   And a configuration file :  template_main=main.txt template_other=other.txt text1=whatever text2=blah   The templates are text files with placeholders like %%data2%% (the placeholder form can be changed).  Does someone know a tool to automate this better than with a complicated shell script ? Modify systemd unit file without altering upstream unit file I have installed the pimd service by means of apt. This comes with an upstream systemd unit file (/lib/systemd/system/pimd.service).  I want the service to be restarted when for some reason it gets killed, hence I wish to add the line Restart = always in the unit file.   However, I don’t want to modify the upstream unit file.  Is there any workaround for this? Why do close votes expire? I nominated  to be closed as a dup. I see that two other people upvoted my comment, so they might have voted to close it as well. Now, we didn't gather enough votes, and all close votes expired ... and I can't re-vote to close. What is the motivation behind expiring close votes ... especially for close-as-duplicate? Update: Please take into consideration:  Beta Stack Exchange sites have a smaller community, and fewer people with voting privileges Closing as a duplicate is &quot;usually the right thing&quot; IMHO - much less controversial than closing as off topic. After a vote is reset, the original users can't vote again. On a small site, this makes it even harder to get a consensus of five votes. This time when I used certbot it created a certificate for "www.$website" instead of $website. This is not what I need.  Here it is:    $ website="my_website123.com"   $ sudo certbot certonly --standalone -d $website -d www.$website --email admin@$website              Saving debug log to /var/log/letsencrypt/letsencrypt.log   Plugins selected: Authenticator standalone, Installer None   Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org   Cert not yet due for renewal    You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.   (ref: /etc/letsencrypt/renewal/www.my_website123.com.conf)    What would you like to do?   -------------------------------------------------------------------------------   1: Keep the existing certificate for now   2: Renew &amp; replace the cert (limit ~5 per 7 days)   -------------------------------------------------------------------------------   Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2   Renewing an existing certificate   Performing the following challenges:   http-01 challenge for my_website123.com   http-01 challenge for www.my_website123.com   Waiting for verification...   Cleaning up challenges    IMPORTANT NOTES:    - Congratulations! Your certificate and chain have been saved at:      /etc/letsencrypt/live/www.my_website123.com/fullchain.pem      Your key file has been saved at:      /etc/letsencrypt/live/www.my_website123.com/privkey.pem      Your cert will expire on 2018-10-18. To obtain a new or tweaked      version of this certificate in the future, simply run certbot      again. To non-interactively renew *all* of your certificates, run      "certbot renew"    - If you like Certbot, please consider supporting our work by:       Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate      Donating to EFF:                    https://eff.org/donate-le   Why did it create one for "www" instead of the bare domain?   On all my own servers this exactly command has always created a cert. without "www" - this is what I need. I even tried yesterday on a different server -- without "wwww".  How can I make it create a cert. without "www"? My PC was working yesterday without any problem. I shut it down and tried to open this morning. It prints out these messages on the black screen:  systemd-udevd[713]: failed to execute '/bin/systemctl' '/bin/systemctl start --no-block nvidia-persistenced.service': No such file or directory  systemd-udevd[852]: failed to execute '/bin/systemctl' '/bin/systemctl stop--no-block nvidia-persistenced': No such file or directory   It then continued with the login screen. I entered my password and pressed enter. It waited for a while and the login screen reappeared again.  How can I fix the problem? Calculate the uncertainty in velocity of electron I got this question in one of my periodic test in coaching, I (seemingly) solved the question but later recognised what mess I did.  So, the question is :      Calculate the uncertainty in velocity of an electron. If the uncertainty in its position is ${10^ {-15}} \; \mathrm m$.   By simple calculations one can see that the answer would be ${5.79\times{10^{10}}} \; \mathrm{m/s}$. However, as one can see, the uncertainty in velocity is greater than the velocity of light then how is that possible or there is some other way to handle such problems.  P.S. I know the concept of dynamic mass but I am not very familiar with it. (I think that would work here, but don't know how?) Sigma algebra and algebra difference Java: how do I check if a Date is within a certain range? I have a series of ranges with start dates and end dates. I want to check to see if a date is within that range.  Date.before() and Date.after() seem to be a little awkward to use. What I really need is something like this pseudocode:  boolean isWithinRange(Date testDate) {     return testDate &gt;= startDate &amp;&amp; testDate &lt;= endDate; }   Not sure if it's relevant, but the dates I'm pulling from the database have timestamps. There are many collectable flags throughout the game of Assassin's Creed and every time one is collected, you get a progress indicator (e.g., 33 of 100).  Is there any reason to collect these, other than bragging rights?  I recall getting all available flags in one particular town and never saw any special reward or secret revealed. Unable to change privacy settings upon install of Ubuntu 18.04 LTS How can I split a beamer bibliography across two slides? MathJax isn't currently working on the Android app, which makes it totally useless for the 'technical' sites like  or .  For example, in the Android app:    Same post in a (mobile) browser:     Please add this functionality! How to prove wave nature of large object? Trigger a button click with JavaScript on the Enter key in a text box I have one text input and one button (see below). How can I use JavaScript to trigger the button's click event when the Enter key is pressed inside the text box?  There is already a different submit button on my current page, so I can't simply make the button a submit button. And, I only want the Enter key to click this specific button if it is pressed from within this one text box, nothing else.  &lt;input type="text" id="txtSearch" /&gt; &lt;input type="button" id="btnSearch" value="Search" onclick="doSomething();" /&gt; Why aren't hash values for "nothing" (empty) defined as all zeros? Any decent hash algorithm will produce basically "random like" values for any given input including the empty input.  For example MD5 produces d41d8cd98f00b204e9800998ecf8427e on an empty input.  I wonder, however, why the MD5 algorithm wasn't defined to have a final step where the output is XORed with d41d8cd98f00b204e9800998ecf8427e. This should not affect the cryptographic strength of the hash algorithm, and it would have the convenient property that a hash of all zeros represented a zero input.  Would it simply just because adding that step would slow the hash down a bit? Conditional expectation of $\mathbb{E}(X - Y | (X, Y)\in\mathcal{A})$ Given two independent random variables $X \sim \mathcal{U}[-1,5]$ and $Y \sim \mathcal{U}[-5,5]$, what is $$\mathbb{E}\{Y - X | X \le 1, Y &gt; X, Y \in [-1,1] \}\,?$$  I managed to compute the respective probability   $$ \mathbb{P}\{ X \le 1, Y &gt; X, Y \in [-1,1] \} = \mathbb{P}(X \le 1) \mathbb{P}(Y &gt; X) \mathbb{P}(Y \in [-1,1]) = 1/3 * 1/2 * 1/5 = 1/30$$  How do I continue from there? What is the difference between String.Empty and "" (empty string)? I'm using the Apache Commons EqualsBuilder to build the equals method for a non-static Java inner class. For example:  import org.apache.commons.lang.builder.EqualsBuilder;  public class Foo {     public class Bar {         private Bar() {}          public Foo getMyFoo() {             return Foo.this         }          private int myInt = 0;          public boolean equals(Object o) {             if (o == null || o.getClass() != getClass) return false;              Bar other = (Bar) o;             return new EqualsBuilder()                 .append(getMyFoo(), other.getMyFoo())                 .append(myInt, other.myInt)                 .isEquals();         }     }      public Bar createBar(...) {         //sensible implementation     }      public Bar createOtherBar(...) {         //another implementation     }      public boolean equals(Object o) {         //sensible equals implementation     } }   Is there syntax by which I can refer to other's Foo reference apart from declaring the getMyFoo() method? Something like other.Foo.this (which doesn't work)? The following is a geometry puzzle from a math school book. Even though it has been a long time since I finished school, I remember this puzzle quite well, and I don't have a nice solution to it.  So here is the puzzle:    The triangle $ABC$ is known to be isosceles, that is, $AC=BC$. The labelled angles are known to be $\alpha=\gamma=20°$, $\beta=30°$. The task is to find the angle labelled "?".  The only solution that I know of is to use the sine formula and cosine formula several times. From this one can obtain a numerical solution. Moreover this number can be algebraically shown to be correct (all sines and cosines are contained in the real subfield of the 36th cyclotomic field). So in this sense I solved the problem, but the solution is kind of a brute force attack (for example, some of the polynomials that show up in the computation have coefficients > 1000000). Since the puzzle originates from a book that deals only with elemetary geometry (and not even trigonometry if I remember correctly) there has to be a more elegant solution.