When converting my 2D matrix from String into char, for some odd reason, its printing in ASCII.  import java.util.Arrays;  public class Matrix {  //    static String[][] matrix = { //            {"a", "L", "M", "d"}, //            {"b", "G", "c", "N"}, //            {"H", "K", "e", "F"}, //            {"I", "J", "O", "P"} //    };      static char[][] matrix = {             {'a', 'L', 'M', 'd'},             {'b', 'G', 'c', 'N'},             {'H', 'K', 'e', 'F'},             {'I', 'J', 'O', 'P'}     };      public static char[][] transpose(char[][] matrix) {         char[][] transposedArray = new char[4][4];          System.out.println("Before: \n");         for (int row =0; row &lt; 4; row ++) {             for (int col = 0; col &lt; 4; col++) {                 System.out.print(matrix[row][col]+' ');             }             System.out.println("");         }          System.out.println("\nAfter: \n");         for (int row =0; row &lt; 4; row ++) {             for (int col = 0; col &lt; 4; col++) {                 transposedArray[row][col] = matrix[col][row];                 System.out.print(transposedArray[row][col]+' ');             }             System.out.println("");         }          return transposedArray;     }      public static void main (String args []){         transpose(matrix);     } }     Before:   129108109132 130103131110 104107133102 105106111112   After:   129130104105 108103107106 109131133111 132110102112     Why doesn't it print it normally like this:  Before:   a L M d  b G c N  H K e F  I J O P    After:   a b H I  L G K J  M c e O  d N F P
How do you concatenate characters in java? Concatenating strings would only require a + between the strings, but concatenating chars using + will change the value of the char into ascii and hence giving a numerical output. I want to do System.out.println(char1+char2+char3... and create a String word like this.  I could do   System.out.print(char1); System.out.print(char2); System.out.print(char3);   But, this will only get me the characters in 1 line. I need it as a string. Any help would be appreciated.  Thanks
Almost surely convergence of the sequence Let ${X_n}$ be a sequence of independent and identically distributed, square integrable random variables.   Write $ u = E(X_n)$. Study the almost sure convergence, as $n \rightarrow \infty$, $$S_n = (X_1X_2 + X_2X_3 + ... + X_{n-1}X_{n})/n$$   Since $X_iX_{i+1}$ are not independent, it seems we cannot directly use law of large number for that, so anyone can give me some idea? Question about preposition -of- Sentence:      A set of deer antlers lying on a flat stone just inside [of?] one cave reveals more recent visitors.   Should we use preposition -of- in that case?  I have checked Corpus of Contemporary American English and have found examples of both usages:        ...to plant another 20 acres of vines, finish building the inside of   an on-site cave, and work on building a retail tasting room (Fiction)   However, opened and remained blue as the inside of an ice cave, paler   than the shell of a robin's egg (Fiction)   It looked like the wall on the inside of a cave: flat and kind of   scale (Fiction)   ...-To protect the inside of the cave. " // He stepped inside, leaving   the gate open.  (Fiction)     Views outside and inside of Wind Cave in South Dakota (Magazine)   Above, Black Hills grasslands and, right, boxwork inside of the cave   (Magazine)   You can see Bill Elliott's great photos of what you can see inside a   cave. (Spoken)   So, when I am asked, what was your feeling inside the cave? (Spoken)   At some point, we found a small river running through the inside the cave (Spoken)   We were gathered around a small fire inside the cave (Fiction)   About 700 feet inside El Sidrn cave, a research team including   Lalueza-Fox excavated 1,700 bones (Academy)      I still cannot come up with a clear pattern why we are using -of- in some cases but are not using it in other. Is it more a question of style rather then a grammar? Or it has something with how speaker/writer sees things around and perceives a reality? Does absence of -of- make things sound weird/wrong for native speaker? Thanks. I found a feature request at  but it doesn't seem easy to get a column view with Nautilus while with Mac OS X it's a default feature.  Have I missed something or is this not currently possible? Do gravitational lenses work on gravitational waves? Why does my document 'error' when using '%' I am designing gamecards in LaTeX  Everything is going pretty ok so far but when i try to insert the %-sign for a question about percentages my file keeps giving errors.  I tried putting the percentage between dollarsigns because i know just % will make it a 'remark' and that the dollarsign makes it 'mathematical data'.   Whats the reason for the error?   P.s. the error says: file ended while scanning use of \kaart. ...    Codesample:   {\kaart{Bekijk statistiek kaart F:   Schat het percentage mensen dat als lievelingseten spaghetti opgaven, je mag er slechts $ 2% $ langs zitten. } { $ 11% $}} How to create id with AUTO_INCREMENT on Oracle? Overall reputation scores are headed nowhere but up.  Pretty soon there will be thousands of mods.  What to do?  Thoughts on possibilities:   Thousands of mods is fine.  Carry on. Adjust the threshold values for high-level SO privileges. Do a straight-up inflation adjustment.  You had x rep, then at the turn of the year we applied the Consumer Rep Index to all scores, now you have (x / inflation) rep. Implement a rep decay mechanism, so that inactivity sheds some of the overall rep that's built up. To power my microcontroller (ATmega8), I am using a ~5.4V voltage source. I want to ensure that I don't accidentally connect the voltage source in reverse, and figured a diode would be a nice way to accomplish this as from what I have learned so far, a diode allows current to flow in one direction, and blocks it in the other.  But what I also learned is that diodes create drops in voltage. I have a few of the typical diodes (1N4001, 1N4148, etc.), and would like to use them to achieve the aforementioned result without dropping the voltage as it would be too low to power the IC.  My question is, is there any way to do this with a diode? Or do I need some other component (if so, what would you recommend)? 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? What is Interface method in salesforce When I parent an object to follow a path and animate it, I only get a linear mode animation and changing that in Grapth Editor to bezier doesn't work! How to do that? What's the difference between "speak" and "talk", grammatically speaking? There are a number of questions e.g.  and  that deal with the slightly different connotations of the words "speak" and "talk". However, there also seem to be some grammatical differences between the two words. This question is about whether there's a way to formally pin down these differences, or whether they're just contingent features of the two words having different histories.  Some examples of grammatical differences are as follows:   be talkative ... be speakative speak French ... talk French give a talk ... give a speech (as opposed to a speak) speak up ... talk up (the meanings of the two phrases being completely different, with "up" being a preposition only in the latter case) speaking of which ... talking of which grammatically speaking ... grammatically talking   On the other hand, many other constructions work just as well with either (though they might have subtly different meanings), for example   speak to ... talk to speak with ... talk with speak about ... talk about   I'm interested in whether there's a way to pin down these differences (e.g. are the two words classified as different types of verb in some way?), or whether they're essentially just arbitrary. I'm also interested in why we have these two different words with subtly different meanings. Is the distinction between “speak” and “talk” a feature of many languages, or is it just a peculiarity of English?  Etymologically, both words are from Germanic origins. “Talk” seems to have been formed from the Middle English tale, even though “speak” already existed in the English language by then (as far as I can tell). This makes it even more mysterious: Why did we form a new word as a synonym of one that was already established? Or were the meanings different at that time? Is there a way to format a UTC time into any arbitrary string format I want in java?  Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me.  Is there a way to do this? The link button in the post editor incorrectly escapes square brackets in inline code.  To reproduce:   Write the following MarkDown in the editor  text text `function[]` text text  Select `function[]`, press the link button (), and enter some link the result will be [`function\[\]`][1] which renders as function\[\]   This comes up very often in   when I'm linking to the documentation because the usual way to indicate that a symbol is a function in Mathematica is adding [] after it.  This is a minor thing, as it's easy to manually remove the backslashes, but it's somewhat annoying so I thought I'd mention it.    Edit by Mr.Wizard It is September 2013 and this still hasn't been fixed.  While "adding [] after it" is not presently the custom on Mathematica.SE this is still a bug and still needs to be fixed. How to put legend below the chart? I have the following code that produces a line chart:  \begin{figure}[p]     \centering \begin{tikzpicture}     \begin{axis}[     use units,     cycle list name=exotic, %This defines the color. It produces nicer colors         width=15cm, height=8cm,     % size of the image         grid = major,         grid style={dashed, gray!30},         %xmode=log,log basis x=10,         %ymode=log,log basis y=10,         xmin=0,     % start the diagram at this x-coordinate         ymin=0,     % start the diagram at this y-coordinate         %/pgfplots/xtick={0,5,...,60}, % make steps of length 5         %extra x ticks={23},         %extra y ticks={0.507297},         axis background/.style={fill=white},         ylabel=Time,         xlabel=Number of Datapoints (n),         y unit=s,y unit prefix=m,         tick align=outside]        % import the correct data from a CSV file       \addplot table [col sep=comma,trim cells=true,y=Best Case (Ascending)] {datasets/time_mergesort.txt};           \addplot table [col sep=comma,trim cells=true,y=Average Case (Random)] {datasets/time_mergesort.txt};                     \addplot table [col sep=comma,trim cells=true,y=Worst Case (Descending)] {datasets/time_mergesort.txt};                      \legend{Ascending,Random,Descending}     \end{axis}  \end{tikzpicture}     \caption{Mergesort Run Time for Sorting Random Data}     \label{fig:merge_sort_from_csv} \end{figure}   And at the moment the legend appears on the chart on the upper right corner. I need to move that below the chart, or even to leave that on the chart but to move that on the upper left corner.   I have tried the solution mentioned at , but it did not work for me.  How can I move the axis in a different position? I have to refactor a large C# application, and I found a lot of functions that are never used. How can I check for unused code, so I can remove all the unused functions? I want to remove all the files from different directories, and want to keep only latest files 20 files. is this the correct command to do this?  ls -t1 /mnt/dwh/ftp/dwh_ftp_cbs/ARLOGS/ | tail -n +22 | xargs rm -f Have we managed to make a perfect vacuum? Have we managed to make a device without any atom inside it on earth? I was reading about vacuum , and I found in the examples part  that even on the best man made vacuum devices, there are still millions of "molecules per $cm^3$". So my other question here is, what are these molecules and what is the mass of them? When I open a window to air out the room, how does the smell disperse? How to get Url Hash (#) from server side I know on client side (javascript) you can use windows.location.hash but could not find anyway to access from the server side. I'm using asp.net.