I've having trouble reversing a string using recursion - I'm pretty new at this concept. I'm testing my code with the word &quot;hello&quot;. It is only printing out 'h' at the end and not the entire string I was trying to build up during the recursion. I know using strings to add is slow but I haven't thought about making it faster right now since it is not working. public class MyClass  {     public static void main(String[] args) {         System.out.println(reversedString(&quot;hello&quot;, 0, &quot;&quot;));     }          public static String reversedString(String str, int index, String sb) {                  if(index == str.length()) {             return null;         }                 reversedString(str, index + 1, sb);         sb = sb + str.charAt(index);         return sb;              } }
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?
Proposing Windows as its own Stack Exchange site? Is there a reason why we have a "Unix and Linux" Stack Exchange and an "Apple" Stack Exchange but no "Windows" Stack Exchange? (Hell even Ubuntu got its own)  I couldn't find it anywhere so I'm asking.  Since Windows has many users it would be a potent Stack Exchange. What is probabilistic programming? For the past year, I've been hearing a lot about Probabilistic Programming (PP) frameworks like  and , and how great PP is. And today, someone shared this link with me:    However, I don't really follow what is special about it since it feels like whatever you can do in PP you can do in any other general purpose language. I'm sure there are technical aspects about PP that make it attractive (e.g. parallel computing), but this aside, is PP really any different from any other language?  Question: I was wondering if there was a consensus of what PP was and how it differs from other statistical-focused software like R, Matlab, Mathematica. It should be noted that PyMC3 and Stan are focused on more Bayesian analysis.  Doing a little research on Google, I came across the following two definitions. The first more abstract, and the second more about PP's technical characteristics.     1.2. Probabilistic Programming Is      Instead, probabilistic programming is a tool for statistical modeling. The idea is to borrow lessons from the world of programming languages and apply them to the problems of designing and using statistical models. Experts construct statistical models already—by hand, in mathematical notation on paper—but it's an expert-only process that's hard to support with mechanical reasoning. The key insight in PP is that statistical modeling can, when you do it enough, start to feel a lot like programming. If we make the leap and actually use a real language for our modeling, many new tools become feasible. We can start to automate the tasks that used to justify writing a paper for each instance.      Here's a second definition: a probabilistic programming language is an ordinary programming language with rand and a great big pile of related tools that help you understand the program's statistical behavior.      Both of these definitions are accurate. They just emphasize different angles on the same core idea. Which one makes sense to you will depend on what you want to use PP for. But don't get distracted by the fact that PPL programs look a lot like ordinary software implementations, where the goal is to run the program and get some kind of output. The goal in PP is analysis, not execution (added emphasis).   --   I'd like to know if the general statistical community agrees with these two definitions of PP, and if there are any other characteristics this definition may be missing. Can I remove inline event handlers using jQuery? Stop inserting hard line-wraps in blockquotes! When you use the markdown editor's blockquote feature (the quote button / Ctrl+Q), it inserts hard line-wraps in the markdown source automatically for you. That is, it transforms text like this:  Hindus regard it as an earthly manifestation of the goddess Tulsi, a consort of the god Vishnu.   The offering of its leaves is mandatory in ritualistic worship of Vishnu and his forms like Krishna and Vithoba.   Into text like this:  &gt; Hindus regard it as an earthly manifestation of the goddess Tulsi, a &gt; consort of the god Vishnu.  &gt;  &gt; The offering of its leaves is mandatory in ritualistic worship of &gt; Vishnu and his forms like Krishna and Vithoba.   The editor should instead transform it into this:  &gt; Hindus regard it as an earthly manifestation of the goddess Tulsi, a consort of the god Vishnu.  &gt;  &gt; The offering of its leaves is mandatory in ritualistic worship of Vishnu and his forms like Krishna and Vithoba.   That is, without adding any newlines.   Why on earth does it insert hard line-wraps!? Both these forms look the same when rendered, but the current way makes it more difficult for us to go back and edit the blockquoted text later if need be.   This is particularly objectionable functionality for sites that use MathJax - while the hard line-wraps don't impact the rendered output, the additional &gt; that are inserted do (they manifest as greater-than signs if they get inserted within MathJax $$...$$). See this post on Meta.Math.SE for more details: .    I found  that this behavior is apparently :      The "reflow the text when you click blockquote" is a deliberate feature, intended to improve the readability on quoted text.   Seriously? Are there any browsers that don't soft-linewrap textareas anymore? How is hard-wrapping at 70(?) characters better than soft-wrapping at $textareawidth? If readability is the concern here, then why not hard-wrap all non-code upon post submission? Cannot empty trash I am trying to empty my trash, and it keeps giving me an error message that says,      .Trash can't be opened right now because it's being used by another task...     I have tried restarting my computer, running Finder > Secure Empty Trash everything yields the same result and error message from above. For QA workstations preparation (Windows-based PCs) our IT department uses typical batch deployment tools. I'm not at all interested in the details of such process, but IT guys ask me:  What typical set of software you need for everyday manual testing tasks? We could include these in our deployment so that you guys could save more time for testing, not for environment prep &amp; tuning.  Sure thing we do test various range of projects, from web applications to standalone solutions, and each application requires its own set of tools for manual testing, e.g.:  Browsers Virtualization utilities DB clients Screens capturing tools FTP clients XML editors etc.  However, and that's for sure - there's a list of tools every QA MUST have installed on its PC, regardless of project types under testing. My area of experience is mostly standalone / complex web apps, that's why my vision on the task is a bit subjective. So, your suggestions of what are tools / software an average QA specialist can't live without will be highly appreciated. 2 assumptions:  Manual testing is a point of interest. Let's limit the list to not more than 15 (better 10) items.  Thanks in advance! Continuous bijection from $(a,b) \to S^1$? Is product of two closed sets closed? If $A$ is closed in $X$ and $B$ is closed in $Y$,   does it follow that $A \times B$ is closed in $X \times Y$ ? I have noticed that some questions get a lot of responses quickly, and the cool fact is that most of the time these initial responses are correct.  I see users are motivated to accept answers. Because many questions take less than 24h to get an acceptable response, I'm unsure what to do when I have a question that takes more than 24h to get a response that I feel is complete enough to warrant being marked as accepted.  And even for acceptable responses, I often hesitate to accept them out of concern that posters will pass my question by if it already has an accepted answer (unless it has lots of upvotes). Does this really deter the higher-quality posters, though? Indefinite articles used with plural nouns: It was AN amazing TWO DAYS The indefinite article a(n), derives from the old English word an meaning "one". Generally this word only occurs in determiner function before noun phrases which are singular. However, there seem to be some cases where this determiner occurs before plural noun phrases. I say that, but actually these noun phrase seem so bizarre to me, in terms of their structure, that I'm not sure they're definitely noun phrases at all. Here are some examples:   a full three months before we left an amazing two days an awkward ten minutes   Ignoring the article here for a moment, these noun phrases are odd because the adjective is occurring before the numeral. We would normally expect to see:   three full months two amazing days ten awkward minutes   Even given the oddness of the word order in the original phrases, I can see no reason why the normally singular indefinite article is licensed here.   Can anybody give an account of the syntactic structure of these phrases, and/or explain why the semantically singular article is able to be used with such phrases - even if they compulsorily trigger plural verb agreement?  Here is an example of one of these instances which seems to demand a plural verb:   An amazing two million people attend every year. *An amazing two million people attends every year. (ungrammatical) Bind a key for multiple units to use the same spell Does opacity:0 have exactly the same effect as visibility:hidden I was wondering if there was any was I could right click inside any instance of a "Finder" window such that I have an option that says "Open Terminal Here". It would be really helpful. Show that the cardinality of $\mathbb N$ is the same as the cardinality of $\mathbb N \times \mathbb N$ Show that $| \mathbb N | = | \mathbb N \times \mathbb N |$, i.e., the cardinality  of $\mathbb N$ is the same as the cardinality of $\mathbb N \times \mathbb N$.   How do I show it using the Fundamental Theorem of Arithmetic and the Schröder–Bernstein Theorem? A similar question was asked , but it was specific to .NET 3.5. Specifically, I'm looking for the following:   What is the correct way to determine which .NET Framework versions and service packs are installed? Is there a list of registry keys that can be used? Are there any dependencies between Framework versions? I'm new to field extensions and I can neither see why or how to prove this statement.  If I'm not mistaken, to construct a splitting field, you construct rupture fields one after the other, using that the $8$ element field is the splitting field of $X^8-X$ over $\mathbb F_2$, since $2$ is the only prime divisor of 8.  Over $\mathbb F_2$ $X^8-X$ has two roots : $0$ and $1$. Therefore $X^8-X=X(X-1)(1+X+...+X^6)$. The last factor, call it $P$, has no roots. So let $\alpha$ be a root in some extension $\mathbb F_2(\alpha)$ of $\mathbb F_2$.  We now have $P=(X-\alpha)(X^5+\alpha X^4+...+\alpha^4X+\alpha^5)$.  I suspect $\alpha$ might not be the way to go and if so, my second plan would be to reduce $P$. I don't know how to do this but assuming it to be done, hence having $P=P_1...P_n$, I could start using $P_1$'s rupture field, and then my best guess is that if $\mathbb F_2[X]/(P_1)$ is not sufficient, I re-reduce $P$ over this new field and consider the rupture field of one of the factors, and so on.  Now assuming I wasn't given the statement itself, is it elementary to construct the $8$ element field using $\mathbb F_2$ ? Prove by induction that... $1+3+5+7+...+(2n+1)=(n+1)^2$ for every $n \in \mathbb N$ I'm trying to graph the function $y = \frac{x^2-4}{x-2}$.  I factored the numerator into $(x+2)(x-2)$, and then canceled the common factor (x-2), leaving the function as $y = x + 2$.    Is it acceptable to graph the original function as $y = x + 2$, a straight line with domain and range all real numbers?  Or do you have to restrict the domain as in the original function?  Thanks, Sean How can we close questions with bounties? I just encountered , which is very cute and funny and has nothing to do with programming.  I tried voting to close, but was informed by the system that I can't do that when there's a bounty on the question.  So, since there's a seven-day bounty, this will remain open for at least a week.  I really don't care what happens to the bounty rep, I just want to be able to close questions that are thoroughly inappropriate although not offensive. System.FinalException: Record is read-only: Trigger.updateCompetitors: line 24