This rather inelegant method takes an input array of objects and outputs a string result, which is the result of ToString() for each element, space separated.   string Format(object[] args) {    var res = string.Empty;    foreach (var o in args)    {       res += o.ToString();       if (o != args.Last())          res += " ";    } }   Surely there is a C# method hidden somewhere to do this type of operation, or if not, a more elegant way to write it using Linq? Another concern with how I have written this method is the garbage generation by building the string incrementally.
Is there any easy LINQ expression to concatenate my entire List&lt;string&gt; collection items to a single string with a delimiter character?  What if the collection is of custom objects instead of string? Imagine I need to concatenate on object.Name.
java.lang.IllegalArgumentException: The servlets named [X] and [Y] are both mapped to the url-pattern [/url] which is not permitted I just discovered an incredibly annoying "feature" of Windows 7 tonight.  If you click on your optical drive in Explorer, and there is no disc in the drive, Windows 7 is kind enough to open the tray for you.  I'm finding it hard to contain my rage over this idiotic design decision.  WTF?  According to , this behavior was apparently introduced in Vista.  The author posted a workaround, but I don't want a workaround.  I want it to stop doing this.  Like he, I have a case with a door that covers the drive bays.  If it's closed, and I accidentally click on that optical drive, it knocks on that door 10 or 12 times before giving up.  Can this behavior be turned off in Windows 7? The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead Why is the notation $\frac{\partial f}{\partial x}$ used? I am trying to design a circuit and was wondering how to design it that the 12V 800mAH NimH battery I am using will not overcharge. I have researched trickle charging and as far as I understand, a zener diode that regulates the voltage down to about 13.3-13.7V should do. I chose a 14V Zener, taking into account the .6-.7V drop.   I have heard that trickle charging is not the best for the battery, but am not sure how much more work designing a smart charger would take.  I was also thinking of using another diode to prevent flow back to the panels from the battery.         &ndash; Schematic created using  The three voltage sources on the left represent the solar cells, with the NiMH battery on the right.  I was wondering if I needed any additional components if I were to use three 5.5V solar cells in parallel outputting 40mA (16.5V total at 40mA, regulated to 13.3V by the zener) in order to prevent overcharging.  A similar question to mine was asked at  However, this dealt more with a larger lead-acid battery and used a voltage regulator with a schottky diode.   This link discusses almost my exact same question, but I was confused to the answer given which said that up to 1.45V per cell could be charged, taking my max charge voltage up to 14.5V.   Considering I am only outputting 40mA to an  800mAH battery, it seems that I may not need any more battery protection, but would love any input. Can't quantum teleportation be superluminal some percentage of times? I apologize if this is a really silly question.   In the (textbook) quantum teleportation algorithm, in the step right after Alice has measured her system but before she has sent her classical information to Bob, she is about to send one of the following values: 00,01,10,11.   What if Bob doesn't want to wait and simply takes a guess? Wouldn't there then be superluminal communication 25% of the time? After enabling hibernate grub menu appears on start-up with 30s timeout My system is not dual boot just single OS UBUNTU 16.04. Prior to making the following changes, the Grub screen would not appear at start-up (OK).  After following these steps from  to enable hibernate in the system menu:   Open terminal and enter;   sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla  add the lines into the empty file;  [Re-enable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes  [Re-enable hibernate by default in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit ResultActive=yes  ^X then Y to save (a filename was suggested and I accepted without taking note).  Reboot for the changes to take effect.   hibernate now works and appears in the menu (OK) but whenever I reboot I now get a Grub menu at start up with a full 30 second timeout (NOK). I tried playing around with the Grub menu timeout settings but still get the full 30 sec timeout.  How do I stop the Grub menu from appearing and reduce my boot time to what it was before I made these changes.   Current Grub settings;   GRUB_DEFAULT="0" GRUB_HIDDEN_TIMEOUT="0" GRUB_HIDDEN_TIMEOUT_QUIET="true" GRUB_TIMEOUT="1" GRUB_DISTRIBUTOR="`lsb_release -i -s 2&gt; /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" I recently installed Ubuntu 11.10 (new install). I would like to use the Adwaita theme with Unity, but it seems that it is not available in the theme selection dialog. I know I get it there after installing gnome-shell, but is there a way to use Adwaita theme for Unity without installing gnome-shell? Holomorphic self map on the open unit disc Relativity and Galaxy Rotation Speed If time travels slower nearer gravity wells, why can't the galaxy rotation speeds being faster on the outer edges than the inner areas be explained by relativity? What necessitates dark matter? PHP: How do I loop through every XML file in a directory? Can we add Markdown support for tables? My ESTA approval if I have previously had a B1 refusal I applied for a B1 visa to attend a conference in the USA in 2013. I had another nationality (Non- VWP) at the time and my B1 application rejected under section 306 of border security. I now can apply for ESTA under my new nationality. Can my ESTA application get approved? If not and I need to apply for visa is it every time I need to travel to stated or is it just the first time? Reading the book on which I'm learning English, I've come across a weird (for me) omitting the "to" in sentence: "I'd better go meet with him then."  Say, if it were "I'd better go to meet with him then.", would there be any difference between the two sentences? When I should prefer using one instead the other?  P.S. Sorry for my bad English. If I made a mistake somewhere, please correct me. When Ron broke his wand, why didn't he apply for Hogwarts financial aid? To perform a bit flipping attack, the previous block is modified by using XOR. This results in an altered plaintext. However, now the ciphertext of the previous block is altered, hence it will result in an invalid format. Am I correct or am I missing something?   For example, suppose I have the following plaintext name=jcconvenant;photo=picture.jpg;admin=false;colour=red;  and the correspoding ciphertext c26a5697689463d662f540e55e2a1ecef9c5df20133dfe49d6d3c369679a95ff4f4c5a490f530b2a2f25db40da64f1e9302724ce61b9a435e23f4d600252a143  Suppose we perform a bit flipping attack and get the following ciphertext c26a5697689463d662f540e55e2a1ecef9c5df20133dfe49d6c1d07071c495ff4f4c5a490f530b2a2f25db40da64f1e9302724ce61b9a435e23f4d600252a143  Then the resulting plaintext will still look corrupted.   ¶ä╚°  h8ì│►Nƒz│Ioé¤ßkü2KÀQiý4I@pg;admin=true;;colour=red;  Is there a way to perform bit flipping while still obtaining a valid plaintext? When I boot Ubuntu 10.04.3 from a live CD, it asks me to enter a username and password. I have not booted before, and I haven't created an account. What is hard reset and what is factory reset? It is mentioned at  that one should do Factory reset or hard reset. I'm a bit confused about what is hard reset?  Factory reset I suppose is using the option in settings to reset phone to the factory state i.e. when it was unboxed. Is there an AES identity key? The following questions are of pure theoretical nature. I don't have an application in mind.   Is there a key that makes AES the identity function? Is there a key that makes AES the identity function for certain inputs? Is it known whether such keys might exist? Are such keys known for other ciphers?   For example, I want to encrypt "Hello StackExchg" with AES with said key and the ciphertext should be again "Hello StackExchg".  When I encrypt "Hello StackExchg" with the perfect cipher one-time-pad, there is a possibility that the resulting ciphertext is again "Hello StackExchg". This possibility must exist (though it is unrealistically small), otherwise, the ciphertext would not be perfectly random but depending on the plaintext. The corresponding key for one-time-pad would be all zeros. How to run ubuntu/xubuntu in a complete non-gui mode