Java hashtable or hashmap? I've been researching to find a faster alternative to list. In an algorithm book, hashtable seems to be the fastest using separate chaining. Then I found that java has an implementation of hashtable and from what I read it seems to it uses separate chaining. However, there is the overhead of synchronization so the implementation of hashmap is suggested as a faster alternative to hashtable.   My queations are:   Is java hashmap the fastest data structure implemented in java to insert/delete/search? While reading, a few posts had concerns about the memory usage of hashmap. One post mentioned that an empty hashmap occupy 300 bytes. Is hashtable more memory efficient than hasmap? Also, is the hash function in each the most efficient for strings?
What are the differences between a HashMap and a Hashtable in Java? What are the differences between a  and a  in Java?  Which is more efficient for non-threaded applications?
What should we do about Stack Overflow-specific questions on Meta SE? According to Theorem 8.8 in Time Series A.W. van der Vaart an ARMA process $$\phi (L)X_t=\theta(L)\epsilon_t$$ has a  unique stationary solution $X_t=\psi(L)\epsilon_t$ with $\psi=\theta/\phi$ if $\phi$ has no roots on the complex unit circle. This would imply that the explosive process, with $\rho&gt;1$, is a stationary process $$X_t=\rho X_{t-1}+\epsilon_t$$ with stationary solution $X_t=\sum_{i=1}^\infty \rho^{-i}\epsilon_{t+i}$.  Now indeed $\sum_{i=1}^{\infty} \rho^{-i} &lt; \infty$ so that weak stationarity can be proved by using this representation.   However, here on stackexchange I see a lot of question/answers that suggest that the process above is not stationary (see for example , ). In particular, the accepted answer of the latter question claims that the process is non-stationary by simulating a series and showing it displays explosive trending behaviour.  I think the only way to reconcile the theorem I mention above and the plots in the accepted answer of () is the following: the explosive process is indeed stationary but non-ergodic, that is, we cannot find the statistical properties of $X_t$ such as $\mathbb{E}(X_t)=\mu$ by observing a single infinitely long sample path of the explosive process, mathematically: $$\lim_{t \to \infty}\frac{1}{t}\sum_{t=1}X_t \neq\mathbb{E}X_t$$  Is this reading correct? Algebric proof for the identity $n(n-1)2^{n-2}=\sum_{k=1}^n {k(k-1) {n \choose k}}$ Prove the identity:  $$n(n-1)2^{n-2}=\sum_{k=1}^n {k(k-1) {n \choose k}}$$  I tried using the binomial coefficients identity $2^n = \sum_{k=1}^n {n \choose k}$  but got stuck along the way. Is it possible to induce Mathematica to chop off parts of Graphics objects that exist outside of a Frame? Whether and how to thank a girlfriend or boyfriend in the acknowledgements of thesis? An image alt="" text should contain information about that image in the context of the page, so for instance if you have an article about cats on skateboards and then a photograph of the cat on his skateboard you'd probably give it the alt text of alt="Fluffy pulling some mad tricks on his pimped-out board".          &ndash; Wireframes created with   However, what should happen when that image is a link to a page (such as the Wikipedia cat page)?  I don't think there is any point using the title attribute here because screenreaders just ignore that when an alt attribute exists - the only people who would see the title attribute are mouse users who hover over the image, so that excludes keyboard only users too. It's not really any benefit to accessibility to include a title in this situation (Overall the title attribute is a bit useless really).  So, what should the image ALT text say in this case?   states:     Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.    Therefore giving it the alt text of cat article page on Wikipedia is incorrect because that doesn't describe the image, neither does skateboarding cat image that links to the wikipedia article because the alt text should refer to the image itself, not the link associated with it. How to show that the nth power of a $n \times n$ nilpotent matrix equals to zero $A^n=0$ Approximating $\pi$ with least digits Do you a digit efficient way to approximate $\pi$? I mean representing many digits of $\pi$ using only a few numeric digits and some sort of equation. Maybe mathematical operations also count as penalty.  For example the well known $\frac{355}{113}$ is an approximation, but it gives only 7 correct digits by using 6 digits (113355) in the approximation itself. Can you make a better digit ratio?  EDIT: to clarify the "game" let's assume that each mathematical operation (+, sqrt, power, ...) also counts as one digit. Otherwise one could of course make artifical infinitely nested structures of operations only. And preferably let's stick to basic arithmetics and powers/roots only.  EDIT: true. logarithm of imaginary numbers provides an easy way. let's not use complex numbers since that's what I had in mind. something you can present to non-mathematicians :) In the final episode of season 6 we see that Lyanna Stark is whispering something to Ned. What is she saying? New top bar doesn't show hot threads across Stack Exchange sites Is there a word that describes a parent whose child has died?   Along the lines of "orphan", "widow", and "widower", is there a single word for a parent who has lost a child (of any age)? I received $1000 and was asked to send it back. How was this scam meant to work? Possible Australianism - netbank = a website + app by which an Aussie can do their banking, including transferring money to other people.  A while ago, I ended up with $1000 transferred into my account, which in the description looked like a netbank transfer, not like a cheque, cash deposit etc, and which looked like it had already cleared and landed in my account. Usually when something is still working through the bank's system it displays as 'pending', but did not in this case.  I received a phone call from someone, saying that they had accidentally typed in the wrong account number, and wanting me to send them the same amount of money back via netbank.   Surely bank account numbers have a checksum, which make it relatively difficult for a typo to result in a payment going to the wrong person? What are likely sources of them being able to find my phone number to call me? Obviously, the bank either being hacked, or giving it out in response to a query from this person (but surely the bank is unlikely to tell me my own mobile number if I claim to have forgotten it?). Presumably either my phone, or the phone of someone I have sent money to/received money from could be compromised. Has anyone heard of any instances of this happening?  I then went to my bank, explained the situation and said that I did want to refund the money through the officially sanctioned methodology. After the laughter died down, the bank told me to ask the person to fill out a form, then they would get me to fill out a form that would authorize undoing that exact payment.  I rang up the person to tell them this, and over the course of about a week received an increasingly elaborate story about how that wasn't working, they needed the money immediately, there was a fee to fill out that form and they couldn't afford to pay it etc.  After that, I never heard back from them again. I check my netbank for several weeks after, expecting the money to magically disappear, but it did not. This was probably a year ago, and I'm pretty vague with money so may not have noticed if it disappeared more recently. How were they expecting to benefit?  Were they hoping to get the transfer from me, and undo the transfer to me, to leave them $1k up? If so, how can an internet banking transfer be 'undone' once it has already shown as 'received'. Or was this to do with money laundering? The account they requested me to send money to was the same as the one that the money appeared to come from. This was a scam, right? Can I Turn Off or Remove Map Layers in QGIS Print Composer The title pretty much says it all.  I have a base map in QGIS that I am using with several Print Composers.  In one of the Print Composers, I don't want one of the layers to show up.  Is there any way to accomplish this? Transit visa at Istanbul Airport, Turkey, during a Turkish Airlines arranged stopover? Do I need a transit visa at Istanbul Airport to enter Istanbul for city sightseeing or hotel accommodation?. All services provided free by the Turkish Airline. I am Nigerian citizen and booked Turkish Airline flight to Nigeria with 12hours layover at Istanbul Airport. I'm trying to figure out how to assign higher priority to one PPA over another PPA. I had a look on bunch of the answers on this forum but none of them solves my problem.  We have two PPA sources on some of our servers which we stick into separate files in /etc/apt/sources.list.d . Some of these repos provide same packages (in terms of names) but different versions and possibly different binaries. Is there a way how we can PRIORITISE one repo over another ?  I read apt_preferences tutorial but it could not be more obscure and didn't find the answers for my question. Here is the situation. WE have the following sources:  $ ls -l /etc/apt/sources.list.d  total 12 -rw-r--r-- 1 root root 66 Jan  2 16:50 nginx-source.list -rw-r--r-- 1 root root 84 Jan  2 16:49 ruby-ng-experimental-source.list   where nginx-source.list content is:  deb     http://ppa.launchpad.net/nginx/stable/ubuntu precise main   and ruby-ng-experimental-source.list content is:  deb     http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu precise main   Both of these sources provide nginx-full package of different versions etc. When I list the priorities ruby-ng-experimental-source.list is on top of output hence nginx-full is installed from that repo:  $ apt-cache policy nginx-full                                  nginx-full:   Installed: 1:1.2.3-1~38~precise1   Candidate: 1:1.2.6-1~43~precise1   Version table:      1:1.2.6-1~43~precise1 0         500 http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu/ precise/main amd64 Packages  *** 1:1.2.3-1~38~precise1 0         100 /var/lib/dpkg/status      1.4.1-1ppa0~precise 0         500 http://ppa.launchpad.net/nginx/stable/ubuntu/ precise/main amd64 Packages      1.1.19-1ubuntu0.1 0         500 http://mirror.rackspace.co.uk/ubuntu/ precise-updates/universe amd64 Packages      1.1.19-1 0         500 http://mirror.rackspace.co.uk/ubuntu/ precise/universe amd64 Packages   How do I prioritize repo listed in nginx-source.list over the one which is on top of the list now ? I tried something like this:  $ cat /etc/apt/preferences Package: nginx-full Pin: origin http://ppa.launchpad.net/nginx/stable/ubuntu Pin-Priority: 1000  Package: nginx-full Pin: origin http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu Pin-Priority: 100   But that has changed priorities of both sources to the same number - or something like that ? So this has NOT changed the priorities and nginx-full is still being installed form the brightbox PPA  $ apt-cache policy nginx-full   nginx-full:   Installed: 1:1.2.3-1~38~precise1   Candidate: 1:1.2.6-1~43~precise1   Package pin: (not found)   Version table:      1:1.2.6-1~43~precise1 1000         500 http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu/ precise/main amd64 Packages  *** 1:1.2.3-1~38~precise1 1000         100 /var/lib/dpkg/status      1.4.1-1ppa0~precise 1000         500 http://ppa.launchpad.net/nginx/stable/ubuntu/ precise/main amd64 Packages      1.1.19-1ubuntu0.1 1000         500 http://mirror.rackspace.co.uk/ubuntu/ precise-updates/universe amd64 Packages      1.1.19-1 1000         500 http://mirror.rackspace.co.uk/ubuntu/ precise/universe amd64 Packages   Anyone has any idea how to achieve what I'm trying to do ? How to switch between low latency and generic kernels? DEFINE vs Variable in PHP How long would it take me to travel to a distant star? Suppose I wanted to travel to one of the recently discovered potentially Earth-like planets such as Kepler 186f that is 490 light years away. Assuming I had a powerful rocket and enough fuel, how long would it take me? Remove space before punctuation I need to remove locally spaces arround (especially before) punctuation signs. This spaces are added by french polyglossia.  \documentclass{article} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{french}  \newcommand{\nospace}[1]{\texttt{#1}}  \begin{document} \nospace{a:b} \end{document}     Thanks for help. Calculate the limit including binomial coefficients