How to combine two byte arrays
Easy way to concatenate two byte arrays
Javascript replace all "%20" with a space I was writing some Unit tests last week for a piece of code that generated some SQL statements.  I was trying to figure out a regex to match SELECT, INSERT and UPDATE syntax so I could verify that my methods were generating valid SQL, and after 3-4 hours of searching and messing around with various regex editors I gave up.  I managed to get partial matches but because a section in quotes can contain any characters it quickly expands to match the whole statement.  Any help would be appreciated, I'm not very good with regular expressions but I'd like to learn more about them.  By the way it's C# RegEx that I'm after.  Clarification  I don't want to need access to a database as this is part of a Unit test and I don't wan't to have to maintain a database to test my code. which may live longer than the project. How can I stop Ubuntu Dock from extending to the edges? By default Ubuntu Dock in Ubuntu 17.10 and later releases always extends to the edges (top-bar-to-bottom if placed on the left or right and left-to-right when placed at the bottom) even when it's not filled with icons. Is there a way to prevent this behaviour (i.e. I want to make the dock-length flexible so that as the number of application icons in the dock increases, it should expand accordingly)?  ➡️➡️➡️  In other words, is there a way make Ubuntu Dock look like a &quot;proper dock&quot; instead of a side/bottom panel with full-height/width? I read through all the related answers, but they do not apply to Ubuntu 14.04.  I have no .gnome2 folder and no Passwords and Encryption keys item in the system settings. I tried to crawl through every possible menu, but I could not find out how to do it.  The popup usually pops out when I start Chromium. Every time a user posts something containing &lt; or &gt; in a page in my web application, I get this exception thrown.  I don't want to go into the discussion about the smartness of throwing an exception or crashing an entire web application because somebody entered a character in a text box, but I am looking for an elegant way to handle this.  Trapping the exception and showing     An error has occurred please go back and re-type your entire form again, but this time please do not use &lt;   doesn't seem professional enough to me.  Disabling post validation (validateRequest="false") will definitely avoid this error, but it will leave the page vulnerable to a number of attacks.  Ideally: When a post back occurs containing HTML restricted characters, that posted value in the Form collection will be automatically HTML encoded. So the .Text property of my text-box will be something &amp; lt; html &amp; gt;  Is there a way I can do this from a handler? How to install the latest Arduino IDE? I have an Arduino UNO, which I need to get working with Ubuntu.  Can somebody explain to me the steps required to install the IDE on Ubuntu? I'm considering buying a solid state drive for my Unibody White MacBook 2010. The trouble is, I have no idea what to look for. What kind of connector am I looking for? (SATA?) What size? I'm told to get the kind that Apple uses so that I don't void my AppleCare warranty. What model/brand(s) would that be? Limit $\frac{x^2y}{x^4+y^2}$ is found using polar coordinates but it is not supposed to exist. Consider the following 2-variable function:     $$f(x,y) = \frac{x^2y}{x^4+y^2}$$   I would like to find the limit of this function as $(x,y) \rightarrow (0,0)$.   I used polar coordinates instead of solving explicitly in $\mathbb R^2 $, and it went as the following:  $$ x = r \cos \theta, \qquad y = r\sin\theta $$   Hence,  $$\lim_{(x,y) \to (0,0)} \frac{x^2y}{x^4 + y^2} = \lim_{r \to 0}\frac{r^2\cos^2\theta(r\sin\theta)}{r^4\cos^4\theta + r^2\sin^2\theta}$$  This simplifies to,  $$ \lim_{r \to 0} \frac{r^3 \cos^2\theta\sin\theta}{r^2(r^2\cos^4\theta + \sin^2\theta)}$$  Simplifying $r^3/r^2$, we finally get;  $$\lim_{r \to 0} \frac{r (\cos^2\theta\sin\theta)}{r^2\cos^4\theta + \sin^2\theta}$$  Now from the above, we find that as $r \to 0$ the limit is $0$.   I wanted to verify this answer so I checked on Wolfram Alpha. Explicitly without changing to polar coordinates, it said that the limit does not exist at $(0,0)$ and rightly so. Then how is it that with polar coordinates, the limit exists and is $0$? Am I doing something wrong in this method?  Also, what should I do in this situation, and when should I NOT use polar coordinates to find limits of multi-variable functions? I tried control+shift+power button as well as command+shift+power button. Neither seem to work. Stringification of a macro value Cooperative game vs Multiplayer game Can any one tell what is difference between cooperative game and multiplayer game? Passing multidimensional arrays as function arguments in C In C can I pass a multidimensional array to a function as a single argument when I don't know what the dimensions of the array are going to be?  Besides, my multidimensional array may contain types other than strings. Putting a table next to a figure Best books for mathematical background? Parse RSS with jQuery I want to use jQuery to parse RSS feeds. Can this be done with the base jQuery library out of the box or will I need to use a plugin? How do I get and modify the source code of packages installed through apt-get? I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them?   I have a couple applications I use regularly that aren't being actively developed any longer and I would like to add features. Where would I go to get the rights to update these applications?  In this case specifically, I am referring to the hellanzb package Test whether string is a valid integer Why doesn't terminal show color schema once logged as root? I'm currently using Debian 7 Wheezy, and I've noticed that the colors palette on terminal (which might be useful to identify among a large set of files and folders) are not enabled once I log as root.  Same, I've noticed the tab completion doesn't work the same in this situation.  How can I configure these issues? How is the notation $X\sim N(\mu,\sigma^2)$ read? Is it $X$ follows a normal distribution? Or $X$ is a normal distribution? Or perhaps $X$ is approximately normal..  What if there are several variables that follow (or whatever the words is) the same distribution? How is it written? Etiquette, rules, or advice on which site to pose a question? (Or, why are there so many StackExchange sites?) Basically: I have a question I want to ask regarding using Apple's AppleScript/Objective-C bridge (Objective C wrapped in AppleScript, basically) to implement an HTML/WebKit-based pager (a drop-in for less, like vimpager) and a HTML-ized manpage writer, which should also be capable of rendering to PDF via pandoc/pdftex, etc.  Is this a:   Stack Overflow question? (C/Objective-C, APIs) Ask Different question? (AppleScript) Unix &amp; Linux question? (implementing a pager which is a drop-in for a *nix utility) TeX question? (PDF rendering) All of the above?   Where and how should I ask this, in order to increase the likelihood of the "right person" seeing it?    Edit: I believe this question was too hastily closed as a duplicate.  While the best answer to this question is indeed identical to answer to the other:     Ask the question on the site you think is most applicable. If ... it does not get any answer,   ask a moderator to migrate the question, or alternatively, delete it and re-ask it.   The so-called "duplicate" in question asks     Is cross-posting permitted on multiple Stack Exchange sites if the question is on topic?   whereas this question asks,     Where and how should I ask this [ question that is on topic on multiple Stack Exchange sites? ]     That is to say, if two similar but materially different questions have identical answers, it does not necessarily follow that the questions are likewise the same.  Calling them duplicate questions does a disservice to both and the site in general I think.