Is any c# lib which convert string like linux command? example:   myCommand -t 123 -s string -ff "string string string"   give me output like  ["myCommand"]=&gt;{   ["t"]=123,   ["s"]="string",   ["ff"]="string string string" }   and example how use :)
When building console applications that take parameters, you can use the arguments passed to Main(string[] args).   In the past I've simply indexed/looped that array and done a few regular expressions to extract the values. However, when the commands get more complicated, the parsing can get pretty ugly.    So I'm interested in:   Libraries that you use Patterns that you use   Assume the commands always adhere to common standards such as .
After my lie down, I posted  on SO. As I suspected would happen, it got moved to programmers. Unfortunately, the kind of people I'm interested in getting answers from (litb,skeet et al - the top SO programmers in their respective disciplines) don't frequent Programmers much. So my question is, where to ask somewhat non-specific questions of high-powered users? When solving this issue (  ), I did a function so that the plugin would auto-hide from all users except one (me:).  The flaw is that it only auto-hides when active.  At first, it was a mu-plugin, but I had to enable/disable it manually. It really doesn't need to run all the time, as it may slow the site (?) or even contain some sensitive manipulation of the site's language (another question mark).  But mainly the motivation is that I don't want the client activating/deactivating/deleting this plugin (is for my own use), and don't want it cluttering her own plugins list.  So, decided to split the functions in two plugins:   One is a Must-Use used to hide the regular one.  The other will be activated/deactivated upon necessity and is the one from the above linked issue.   But now I run into another question: how to hide one plugin from the Must-Use listing? What do "watched tags" and "ignored tags" do? When should I upgrade my camera body? As the question says, when should I upgrade my camera body? In particular, if I have a low- to mid-range body (A DSLR such as a Nikon D3200 or Nikon D5100, or Canon SL1 or T5, or a mirrorless camera such as a Panasonic GH3 or an Olympus E-PL6). How do I know when I need to upgrade?  I have a complement of "kit" lenses, such as an 18-55mm f3.5-5.6 and a 55-200mm f4-5.6. Maybe I've even added a 50mm 1.8 to the kit. Flash is only for indoors (right?) and I usually shoot outside, so that means I don't need an external flash.  I shoot photos of my family and friends whether out at the park or having a picnic, my kids sports practices and games, vacation photos, as well as some landscapes, flowers, and whatever else catches my eye. Pretty familiar territory. I'm not a professional and don't intend to become one. I found this pretty good small research, but I am still concerned about "regular usage" in life, say, when I am talking in the office, especially because of this comment:     To me: Stone is something you can pick up with one hand (for   throwing). A rock takes two hands. Variable variable class extensions in PHP--is it possible? Is something like the following possible in PHP?  $blah = 'foo1';  class foo2 extends $blah {     //... }  class foo1 {     //... }   This gives an error.  I want to dynamically set $blah so I can extend whatever class I want.  Edit: The reason for wanting to do this because I wanted to use a function out of another class in a related class. In the end it would have been something like:  Final extends foo1 extends foo2 extends foo3 extends foo4 extends parent { ... }   In the end I decided to instantiate the other class within the class and use it. Not the best options because they both you 2 of the same classes, but this won't be used that often, so it will work for now. How to prove $a^2 + b^2 + c^2 \ge ab + bc + ca$? How can the following inequation be proven?  $$a^2 + b^2 + c^2 \ge ab + bc + ca$$ calculation of $\int_{0}^{1}\tan^{-1}(1-x+x^2)dx$ Compute the definite integral   $$ \int_{0}^{1}\tan^{-1}(1-x+x^2)\,dx $$   Failed Attempt:  Let $1-x+x^2=t$. Then  $$ \begin{align} (2x-1)\,dx &amp;= dt\\ dx &amp;= \frac{1}{(2x-1)}dt \end{align} $$  Changing the limits of integration, we get  $$\int_{1}^{1}\tan^{-1}(t)\cdot \frac{1}{(2x-1)}dt = \int_{1}^{1}\tan^{-1}(t)\cdot f(t)dt = 0 $$  where $f(t)=\frac{1}{(2x-1)}$.  Is it true that $\int_{a}^{a}f(x)dx = 0$? If not, then where have I made a mistake in my attempted solution? Was Mjolnir ever used for building something? In the movie Thor (2011), while he was about to crown Thor as the next king of Asgard, Allfather Odin describes the mighty hammer Mjolnir as the following:      So long entrusted with this mighty hammer, Mjolnir. Forged in the heart of a dying star, from the sacred metal of Uru. Only one may ift it. Only one is worthy. Who wields this hammer commands the lightning and the storm. Its power has no equal -- as a weapon, to destroy, or as a tool, to build. It is a fit companion for a King.   We know Mjolnir as a weapon of destruction but are there references where it is used to build something? Show $\mathbb{Q}[\sqrt[3]{2}]$ is a field by rationalizing Point Release upgrade from 14.04.1 to 14.04.2? I wanted to upgrade to 14.04.2 point release from 14.04.  What I did was:  sudo apt-get update &amp;&amp; sudo apt-get upgrade &amp;&amp;  sudo apt-get dist-upgrade -y   Then I wanted to upgrade to 3.16 kernel, since it wasn't done with the the above command, so what I did was:  sudo apt-get install linux-generic-lts-utopic xserver-xorg-lts-utopic libegl1-mesa-drivers-lts-utopic xserver-xorg-video-all-lts-utopic xserver-xorg-input-all-lts-utopic sudo apt-get install linux-signed-generic-lts-utopic   Now when I do:   uname -a I get   Linux Y500 3.16.0-33-generic #44~14.04.1-Ubuntu SMP Fri Mar 13 10:33:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux  cat /etc/os-release | grep VERSION= I get  VERSION="14.04.2 LTS, Trusty Tahr"   And when I do lsb_release -a I get  Distributor ID: Ubuntu Description:    Ubuntu 14.04.2 LTS Release:    14.04 Codename:   trusty   I know that uname -a and lsb_release -a both refer to different info, but why does  cat /etc/os-release | grep VERSION= show different version? How to get rid of update notifications for a given app in Google Play Store? General question I have an app X installed on my device in version Y. I don't want to update it to any newer version (Y+z) for some reason. Still, the Google Play Store app always lists updates for X, which keeps me from a simple &quot;update all&quot;. My question, put to a single sentence:  How to hide updates for X permanently from the &quot;available updates&quot; list?   Specific examples First, I know there are alternatives as e.g. the , which can handle this quite well (skip this update, skip all future updates). I prefer a &quot;generic solution&quot;, which does not depend on a 3rd party's market app. Second, I know that  includes a &quot;Market doctor&quot;, which can be used to disconnect an app from Google Play.1 However, in my specific case that only worked for a few hours: I disconnected GTalk, as I don't want it replaced by Hangouts. The update notification disappeared for a few hours, then it was back. No idea what restored the &quot;link&quot;. Third, just to make sure: I'm not talking about the &quot;auto update&quot; feature as discussed e.g. in . I was rather hoping for something close to , but without the need to &quot;freeze&quot; the app in question (which I still want to use, but in the version installed, not in a &quot;future version&quot; available). Fourth: No, uninstalling the app in question is no option here, though it would perfectly hide any future updates from being displayed :) Nor is &quot;freezing&quot;, as the app is used regularly. Fifth: There is a related question for my GTalk example:  However, I want the opposite: No update.  It might very well be that &quot;Google Apps&quot; (and other pre-installed apps) are handled in some specific way, and restore their &quot;market links&quot; themselves somehow. For this case, my question includes: How to prevent that from happening?  Update There's a  discussing the very same issue. Until recently, a work-around for &quot;user installed apps&quot; was to uninstall them and then sideload the .apk – but even that stopped working. Well, re-signing the .apk with a different key might work for user-apps. But both would fail for pre-installed apps (can't sideload them to override; different signature would refuse that install completely). Moreover, there's an  on this by some &quot;joel.bou..&quot;. Not hard to guess, though blanked out: that would be Joël Bourquard. If it's really him, then that's really an issue (for those who don't know: Joël is the dev behind Titanium Backup). Let me quote from the issue:  For the record: in the Android Market days it was possible to &quot;Attach&quot; or &quot;Detach&quot; apps (on rooted devices) with a system tool such as Titanium Backup. But nowadays (with the Google Play Store app) this has become nearly impossible to do, because the complete app list seems to sync from Google's servers and the user has no control over that.  Which explains why detaching with apps like Titanium Backup is no longer permanent. And I'm afraid I've asked the impossible. But I thought the same in the past with other questions, and surprisingly got solutions here. So I do not yet give up hope on this one!  1: what that does is explained by eldarerathis  (thanks to  for digging that up!) Find a recurrence relation for the number of ternary strings of length n that do not contain two consecutive 0s or two consecutive 1s. This is just a curiosity. I have come across multiple proofs of the fact that there are infinitely many primes, some of them were quite trivial, but some others were really, really fancy. I'll show you what proofs I have and I'd like to know more because I think it's cool to see that something can be proved in so many different ways.  Proof 1 : Euclid's. If there are finitely many primes then $p_1 p_2 ... p_n + 1$ is coprime to all of these guys. This is the basic idea in most proofs : generate a number coprime to all previous primes.  Proof 2 : Consider the sequence $a_n = 2^{2^n} + 1$. We have that  $$ 2^{2^n}-1 = (2^{2^1} - 1) \prod_{m=1}^{n-1} (2^{2^m}+1), $$  so that for $m &lt; n$, $(2^{2^m} + 1, 2^{2^n} + 1) \, | \, (2^{2^n}-1, 2^{2^n} +1) = 1$. Since we have an infinite sequence of numbers coprime in pairs, at least one prime number must divide each one of them and they are all distinct primes, thus giving an infinity of them.  Proof 3 : (Note : I particularly like this one.) Define a topology on $\mathbb Z$ in the following way : a set $\mathscr N$ of integers is said to be open if for every $n \in \mathscr N$ there is an arithmetic progression $\mathscr A$ such that $n \in \mathscr A \subseteq \mathscr N$. This can easily be proven to define a topology on $\mathbb Z$. Note that under this topology arithmetic progressions are open and closed. Supposing there are finitely many primes, notice that this means that the set $$ \mathscr U \,\,\,\, \overset{def}{=} \,\,\, \bigcup_{p} \,\, p \mathbb Z $$ should be open and closed, but by the fundamental theorem of arithmetic, its complement in $\mathbb Z$ is the set $\{ -1, 1 \}$, which is not open, thus giving a contradiction.   Proof 4 : Let $a,b$ be coprime integers and $c &gt; 0$. There exists $x$ such that $(a+bx, c) = 1$. To see this, choose $x$ such that $a+bx \not\equiv 0 \, \mathrm{mod}$ $p_i$ for all primes $p_i$ dividing $c$. If $a \equiv 0 \, \mathrm{mod}$ $p_i$, since $a$ and $b$ are coprime, $b$ has an inverse mod $p_i$, call it $\overline{b}$. Choosing $x \equiv \overline{b} \, \mathrm{mod}$ $p_i$, you are done. If $a \not\equiv 0 \, \mathrm{mod}$ $p_i$, then choosing $x \equiv 0 \, \mathrm{mod}$ $p_i$ works fine. Find $x$ using the Chinese Remainder Theorem.   Now assuming there are finitely many primes, let $c$ be the product of all of them. Our construction generates an integer coprime to $c$, giving a contradiction to the fundamental theorem of arithmetic.  Proof 5 : Dirichlet's theorem on arithmetic progressions (just so that you not bring it up as an example...)  Do you have any other nice proofs? I want to setup a new virtual machine with some specified packages (name and version), that are provided.  For example apache2 in version 2.2.20-1ubuntu1 with all dependencies. Even if there is a new version of this package on the servers this one should be installed.  The solution has to work/scale with multiple (n) "setups". Another virtual machine might need an older version of apache2.  I currently know of some possibilities that install the exact packages, but do not scale that good:   Copy all required *.deb to every virtual machine manually and enter: dpkg -i ... -> Could work, but it is very error prone. (Manual scripts etc.) Create and use a new Ubuntu repository for each setup. -> Does not work because I would need n repositories. Setup the machine once and copy the VM / create a snapshot. -> Does not work because I would need to store n VMs.   My problem could be labeled as patch management, but I do not want to update my packages to the current version. My goal is to install old packages. Wrong numeration in toc longer then one page How to extract a number from a string Im a newbie in Apex and im developing a page using Visualforce.  My string format is always like this "xx-xx-999999". In this format I need to get only the integer. For example the string is  "RO-W1-445567". I want to get only the integer 445567 in the string. Can someone willing to share a piece of apex code in my problem.  Your help is vey much appreciated.  Thanks in advance!  Ferdie Banu Nothing can ruin your day like a poorly-written bug report.  I've seen several sets of guidelines for bug reporting in different organizations. In your opinion, what guidelines/steps are most essential for good bug reporting?  Feel free to share complete guideline recommendations from prior/current projects/organizations. QGIS creating a fixed distance buffer over selected areas not the entire layer what im doing is making a fixed distance buffer and it's working splendidly but i need the buffer to be created over certain selected areas not the entire layer, and at the creation wizard is only offers the the option of selecting the entire layer, and i need some areas within that layer to have a different buffer and some none at all.  is there a way around that? making a big summation sign How can I make a big summation sign?   ‎\begin{align}‎ ‎\cos x‎ ‎=‎ ‎‎\sum\limits‎_‎{n=0}^{‎\‎‎infty‎} ‎\frac{(ix)^{2n‎}}{(2n)!}‎‎ \end{align}‎   this is the code which I'm using for summation