I am new to Java and I tried a couple of ways to initialize my HashMap through a method, but every time after method executed, my Map is still empty, I can debug and see during my LoadData method execution, my maps are assigned with value from sub-method, however, when jumping out of the LoadData, my outer parameter becomes empty Map again  // file1.java public Map&lt;String, Student&gt; getStudentWithIdMap() { ... } public Map&lt;String, Teacher&gt; getTeacherWithIdMap() { ... }  public static void LoadData(Map&lt;String, Student&gt; studentMap, Map&lt;String, Teacher&gt; teacherMap, ...other Map) {      studentMap = getStudentWithIdMap();      //I tried with studentMap.putAll(getStudentWithIdMap());      // doing this triggers an exception like "UnsupportedOperationException"      // I also tried studentMap = new HashMap&lt;&gt;(getStudentWithIdMap());      teacherMap = getTeacherWithIdMap(); }  // file2.java public void PrepareData() {    Map&lt;String, Student&gt; studentMap = Collections.emptyMap();    Map&lt;String, Teacher&gt; teacherMap = Collections.emptyMap();    file1.LoadData(studentMap, teacherMap, ...); }   What would be the reason and the best way to deal with the above scenario?   I get to know Java treats method as value type always, so if passing a class object and modify its value, it would be modified after method finishes execution, why a Map behaves differently?
I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?
Adjective for "terrified yet calm and capable" What is an adjective to describe the duality of a first responder (such as an EMT responding to a terrorist attack) who is terrified for the wounded, yet simultaneously calm, detached, and capable enough to give aid? I know  that uses $x={\sqrt{2}}^{\sqrt{2}}$ to prove that there must exist an irrational to an irrational power that evaluates to a rational. But I don't know if $x$ itself is known to be irrational or rational.  Could someone enlighten me? Thanks! How do I create a deb package for a single python script? I have a single python script that I want to distribute as a deb package. It is a  which shows local date in Unity panel. I did follow  but I could not create a deb package because it fails.   Can someone give me a step-by-step instruction on what I should do? As far as I know this script depends on python-appindicator.   NOTE: I do not want any links to Debian/Ubuntu packaging instructions. I have seen most of them. I don't find them beginner friendly. Access to our computer (not only to the internet) needs to be restricted for the accounts of my kids (7, 8) until they are old enough to manage this by themselves. Until then we need to be able to define the following:   the hours of the day when computing is o.k. (e.g. 5 - 9 pm) the days of the week when computing is not o.k. (e.g. mondays to fridays) the amount of time allowed per day (e.g. 2 hours)   In 11.10 all of the following that used to do the job don't work any more:   : for > 11.10 no more available through the ppa. : command line alternative, but from 11.10 removed from the repositories. : Looks great but repeatedly crashes to force restarting X-server. So we can't use or recommed this program at the moment.   Are there any other alternatives? How to fix TikZ corners in 3D Am trying to draw a simple rectangle and there seems to be minor issue with two of the endpoints (f and d in the following). I tried line cap=rect as suggested by  but that did not seem to work.  The resulting image:    \documentclass{standalone} \setlength\PreviewBorder{5pt}%  \usepackage{tikz}  \newcommand*{\Width}{2.0} \newcommand*{\Height}{3.0} \newcommand*{\Depth}{1.0}  \begin{document} \begin{tikzpicture}%     \coordinate (A) at ( 0,       0,     \Depth);%     \coordinate (B) at (\Height,  0,     \Depth);%     \coordinate (C) at (\Height,  0,      0);%     \coordinate (D) at (\Height, \Width,  0);%     \coordinate (E) at ( 0,      \Width,  0);%     \coordinate (F) at ( 0,      \Width, \Depth);%     \coordinate (G) at (\Height, \Width, \Depth);%     \coordinate (H) at ( 0,       0,      0);%     %     \draw [blue, ultra thick,line cap=rect]%         (A) -- (B) -- (C) -- (D) -- (E) -- (F) -- cycle;%     \draw [blue, ultra thick,line cap=rect]%         (B) -- (G) -- (F) -- (E) -- (D) -- (G) -- cycle;%      \path (D)  [right] node {$d$};% Problem Point 1     \path (F)  [left ] node {$f$};% Problem Point 2 \end{tikzpicture}% \end{document}   This problem about  seems related, but I do not understand how to adapt that to my problem. For example, you're a fashion designer who wants to get the opinion of both a professional and someone who doesn't know much about fashion. What's a term for the latter person? Is there a built-in method to compare collections? I would like to compare the contents of a couple of collections in my Equals method.  I have a Dictionary and an IList.  Is there a built-in method to do this?  Edited: I want to compare two Dictionaries and two ILists, so I think what equality means is clear - if the two dictionaries contain the same keys mapped to the same values, then they're equal. $e^{i\theta}=\cos\theta + i\sin \theta$  $e^{i\sin^{-1}x}=\cos(\sin^{-1}x)+i\sin(\sin^{-1}x)$  $i\sin^{-1}x=\ln|\sqrt{1-x^2} + ix|$  $\sin^{-1}x=-i\ln|\sqrt{1-x^2} + ix|$  Now from here I'm kind of lost, since it seems like this should be the definition, but when I look it up, the definition of inverse hyperbolic sine is:  $\sinh^{-1}x=\ln(\sqrt{1+x^2} + x)$  So although they're very similar, I guess I just don't know how to handle the logarithm and anything to the ith power or drop off the absolute value. General trigger bulkification - best practices A general question asked from time to time on stack exchange is question of trigger bulkification.  Therefore I have 2 questions:   Which best practices are you using? What is the best way to handle updates of more than 200 records? (In case of more than 200 records the trigger is executed more than once.) Typical Japanese style anime art, it was a series.   It has been around for more than 6 years. I think it mixed fantasy and sci-fi. It was certainly not Isekai and it has no magic, it feels more like revered science. A boy gets a gem embedded into his arm after a terrorist attack and transforms into a white and orange humanoid being. There are more people able to transform into these beings. There is also a red flying ship with a dark yellow underbelly that throws boxes with parachutes. There is also this top-secret laboratory where the scientists study how to battle against the beings. There are some other flying ships of varying colors. If I remember correctly, the protagonist gets amnesia near the end of the plot. Application_End global.asax Can anybody tell me when Application_End is triggered in a lifecycle of an application? When all sessions are ended, will Application_End be triggered automatically? + Are there any other reasons why Application_End could be triggered? How to get the list of IP addresses in a LAN? What is the closed formula for finding      $$ \sum_{i=0}^{k} \binom{n}{2i}=?\quad ,k\leq \lfloor{n/2}\rfloor $$   I need summation only up to some intermediate  $k$ where $k\leq \lfloor{n/2}\rfloor$ .  SAY I need a closed formula to calculate $\binom{8}{0}+ \binom{8}{2}+\binom{8}{4} +\binom{8}{6}$  HERE $n=8$ and $k=6$ What's a command line way to find large files/directories to remove and free up space? Looking for a series of commands that will show me the largest files on a drive. In Markov inequality proof, why is $\int_a^\infty xp(x) \, dx \ge \int_a^\infty ap(x) \, dx$ Markov inequality,   $$\Pr(X \ge a) \le \frac{E[x]}{a}$$  Proof  $$\begin{aligned}      E(X) &amp;= \int_0^\infty xp(x)\,dx = \int_0^a xp(x)\,dx + \int_a^\infty xp(x)\,dx \\       &amp;\ge \int_a^\infty xp(x)\,dx \ge \int_a^\infty ap(x) \, dx  \end{aligned}$$  Why is the last inequality true? Why is it ok to change $x$ to $a$, and we know it is less than or equal to? How did they figure it out? Thanks! Where can I find documentation on formatting a date in JavaScript? I'm currently building a sitemap for my web app.  Note: my app is a single page app built with React and Firebase.  Basically I wan to index blogPost and product pages. So I intend to generate my sitemap dynamically (on server). It's a small website (around 500 pages).  I want to build something like this:  &lt;urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt;   &lt;url&gt;     &lt;loc&gt;       https://www.myproject.org/blog/some-blog-post-slug     &lt;/loc&gt;     &lt;lastmod&gt;2019-11-14T20:22:43.502+00:00&lt;/lastmod&gt;     &lt;changefreq&gt;weekly&lt;/changefreq&gt;     &lt;priority&gt;0.8&lt;/priority&gt;   &lt;/url&gt;   &lt;url&gt;     &lt;loc&gt;       https://www.myproject.org/dp/some-product-slug     &lt;/loc&gt;     &lt;lastmod&gt;2019-11-15T13:08:52.127+00:00&lt;/lastmod&gt;     &lt;changefreq&gt;weekly&lt;/changefreq&gt;     &lt;priority&gt;0.8&lt;/priority&gt;   &lt;/url&gt; &lt;/urlset&gt;   And I keep the following properties in my database, both for blogPosts and products:  createdAt: &lt;Timestamp&gt; lastModifiedAt: &lt;Timestamp&gt;  // UPDATED EVERYTIME I UPDATE THE RECORD   And I'm thinking about using my lastModifiedAt value as the &lt;lastmod&gt; tag for the sitemap.  So far, so good! Everytime I update my blogPost or product objects in my database. The next time the sitemap is requested, the new modifiedDate will show on those that have been changed.  QUESTION  But what if I make a change not in the database itself, but in the way I render all the product pages, for example.  Imagine that I've added some structured data tags to display rich results on google, with price, reviews etc. So my product info is the same, but from that point on, all of my product pages will render those extra tags that I need to be re-indexed.  Example (add a structured data tag with the product price):   &lt;div property="schema:price" content="119.99"&gt;&lt;/div&gt;   In that situation, will I have to update all &lt;lastmod&gt; for all the products? How Google will know that it needs to re-crawl those pages and be able to see the structured data tags?  What if I change only the styles for the productPages? Do I have to update the &lt;lastmod&gt; for every product in this case? Finding additions and updates between two vector layers using QGIS Textbook recommendation for computational physics Blurring/Feathering a Procedural Pointiness Mask I'm trying to create a procedural mask to affect the sharp edges of my model using the Pointiness output from the Geometry node, leading to the eventual idea of using it to create customisable weathering effects, such as .  This is the base setup that I've got so far.   How is it possible to blur/feather the black edges of the mask so that they would essentially expand across the object until the whole object is rendered black?   I've had a look at both of the go-to texture blur methods suggested for cycles found  and  however these seem to rely on there being a vector input/output for the texture, which is not the case in my example.  The Procedural Cracks tutorial by CGMasters came closest to what I was trying to achieve with the 'Worn Edges' section of the , but I didn't have any success trying to convert it to my situation.  Any ideas would be massively appreciated! :)  EDIT: Not sure if it was clear enough from the description but I'm trying to steer clear of baking/UV-Unwrapping/the Works on this one... Purely procedural :)  UPDATE: I've made a couple of updates to the shader which has given me slightly better results, although it's still not quite there and the mask blur/expansion issue is still not successful.  This is what it now looks like:   The issue is now coming from the grey values of the mask 'leaking' out across the whole mesh and not stemming from the black values... if that makes sense? :P   In researching weathering effects in blender, I stumbled across , which is exactly what I want to achieve?  UPDATE 2: Still no luck achieving the desired effect in the gif, however I feel I'm slightly closer from adding another colour ramp node after the previous ones.    Does anyone have any more ideas?  UPDATE 3: Found a working solution, added an answer below if people are interested :)