I am trying to convert a big byte array of zeros and one to a string variable.  private Random _random; private string _str;  private void Convert(byte[] bytes) {     for (var index = 0; index &lt; 10000000; index++)     {         var b = bytes[index];                         _str += b.ToString();      }             }   But its performance is very low.  Is it possible to convert a big array to string variable with 'unsafe' or 'fixed' keywords? (use memory allocation)
What's the most efficient way to concatenate strings?
Was PreferenceFragment intentionally excluded from the compatibility package? How do I find diamonds? The durability of iron tools is really starting to annoy me, but in all my hours of playing I've only stumbled across one deposit of diamond ore that provided around 7 Diamonds. What's the best way to locate more in Survival mode? Where is it most commonly found? Proving an integral equation. Turning separate lines into a comma separated list with quoted entries I have the following data (a list of R packages parsed from a Rmarkdown file), that I want to turn into a list I can pass to R to install:  d3heatmap data.table ggplot2 htmltools htmlwidgets metricsgraphics networkD3 plotly reshape2 scales stringr   I want to turn the list into a list of the form:  'd3heatmap', 'data.table', 'ggplot2', 'htmltools', 'htmlwidgets', 'metricsgraphics', 'networkD3', 'plotly', 'reshape2', 'scales', 'stringr'   I currently have a bash pipeline that goes from the raw file to the list above:  grep 'library(' Presentation.Rmd \ | grep -v '#' \ | cut -f2 -d\( \ | tr -d ')'  \ | sort | uniq   I want to add a step on to turn the new lines into the comma separated list. I've tried adding tr '\n' '","', which fails. I've also tried a number of the following Stack Overflow answers, which also fail:      This produces library(stringr)))phics) as the result.      This produces ,% as the result.      This answer (with the -i flag removed), produces output identical to the input. How does ownership in fractional shares work? I've been trying to find out some more information about fractional shares, and how they work. I understand conceptually, you own x% of a share rather than x "full" shares, but I'm curious about how such a system is implemented.  As I understand it, in a "traditional" purchase of shares, the role of a broker is to act as an executor on your behalf, and does not hold any assets themselves. In the case of a fractional share, is this then not the case? For example, the broker holds the complete shares, and then just ensures that they keep an internal record of each partial owner in their system? So there would be no external record of partial ownership?  Thanks! Pixel Perfect 2D tiles I'm trying to make an 64x64 tilemap using Super Tilemap Editor &amp; Unity but my tiles looks terrible. I did my research about pixel perfect 2D and all of the solutions were for pixel art, they didn't work for me.  I have the following tileset I made in Adobe Illustrator as an example    Tiles looks like this when placed in game (1x zoom)    I'm pretty sure they're not 64x64 in game, they also look pixelated probably because they're smaller than they actually are on camera.  So my question is, how can I calculate the correct camera size for 64x64 tiles and do I have to make any changes in order to make sprites look pixel perfect? I'm currently using 1080/64/2=8.4375 (vertical resolution / PPU / 2) as camera size. How accurate is approximating the Earth as a sphere? What level of error do I encounter when approximating the earth as a sphere? Specifically, when dealing with the location of points and, for example, the great circle distances between them.  Are there any studies on the average and worst case error compared to an ellipsoid? I'm wondering how much accuracy I'd be sacrificing if I go with a sphere for the sake of easier calculations.  My particular scenario involves directly mapping WGS84 coordinates as if they were coordinates on a perfect sphere (with the  defined by the IUGG) without any transformation. ViewParam vs @ManagedProperty(value = "#{param.id}") How do I resolve these unmet dependencies? How does the versioning work here? How does SO's (or other SE sites) versioning work of questions and answers? Do they use some standard piece of code or is it something homebrew?  With versioning I meant if for example a question is edited you'll see all the changes (a diff). Getting "Not found" message when running a 32-bit binary on a 64-bit system I have currently a strange problem on debian (wheezy/amd64).  I have created a chroot to install a server (i can't give any more detail about it, sorry). Let's call its path /chr_path/. To make things easy, I have initialized this chroot with a debootstrap (also wheezy/amd64).  All seemed to work well inside the chroot but when I started the installer script of my server I got : zsh: Not found /some_path/perl (the installer includes a perl binary for some reasons)  Naturally, I checked the /some_path/ location and I found the "perl" binary. file in chroot environment returns :  /some_path/perl ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped   The file exists, seems ok, has correct rights. I can use file, ls, vim on it but as soon as I try to execute it - ./perl for example - I get : zsh: Not found ./perl.  This situation is quite understandable for me. Moreover :   I can execute other basic binaries (/bin/ls,...) in the chroot without getting errors I have the same problems for other binaries that came with the project When I try to execute the binary from the main root (/chr_path/some_path/perl), it works. I have tried to put one of the binaries with a copy of my ls. I checked that the access rights were the same but this didn't change anything (one was working, and the other wasn't) Pressing Enter in comment box unexpectedly submits form Why is super.super.method(); not allowed in Java? I read  and thought that would easily be solved (not that it isn't solvable without) if one could write:   @Override public String toString() {     return super.super.toString(); }   I'm not sure if it is useful in many cases, but I wonder why it isn't and if something like this exists in other languages.  What do you guys think?  EDIT: To clarify: yes I know, that's impossible in Java and I don't really miss it. This is nothing I expected to work and was surprised getting a compiler error. I just had the idea and like to discuss it. If an opponent casts  to gain control of  then sacrifices it who will draw the card? How can super massive black holes have a lower density than water? I heard on a podcast recently that the  at the centre of some galaxies could have densities less than water, so in theory, they could float on the substance they were gobbling up... can someone explain how something with such mass could float?  Please see the below link for the podcast in question: Let $G$ be a connected planar graph with a planar embedding where every face boundary is a cycle of even length. Prove that $G$ is bipartite.  Any hints/tips will be greatly appreciated. How to enable touchpad? Yesterday, suddenly my touchpad on my MSI Laptop started to not respond. In other words, in Login screen, touchpad is working as expected. However, in Desktop screen, after I have logged in, touchpad is not working.  How can I enable touchpad in Desktop? Does infinity exist in physical systems? How to add a Login / Logout link in Main navigation menu? How can I add a Login link to the "Main navigation" menu?  When a user clicks on the link, it should take them to the /user/login page. Once they login, the link should change to say "Logout" instead of "Login".  Is there any way to add such a link? Python: using a recursive algorithm as a generator