example I enter 1357 and program out 106 instead of 10          string num = Console.ReadLine();         Console.Write(Convert.ToInt32(num[1]) + Convert.ToInt32(num[3]));         Console.ReadKey();
I have a char in c#:  char foo = '2';   Now I want to get the 2 into an int.  I find that Convert.ToInt32 returns the actual decimal value of the char and not the number 2.  The following will work:  int bar = Convert.ToInt32(new string(foo, 1));   int.parse only works on strings as well.    Is there no native function in C# to go from a char to int without making it a string?  I know this is trivial but it just seems odd that there's nothing native to directly make the conversion.
How do you make an image emission without washing out the image? I am trying to make a computer monitor. This means I have to have an image texture for the screen. My image texture is currently connected to an Emission BSDF shader. Unfortunately, when the emission is bright enough to emit light, the image is white-washed. I tried adding a Brightness/contrast node to the image before pushing it into the Emission BSDF, but it seems to directly counter the Emission's strength.  The desired light level   The desired image brightness Is Argothian Elder a Druid? is listed on a lot of websites with the Druid creature type, but the card only lists "Elf".  Is Argothian Elder a Druid too? Which offences result in indirect free kicks? If a player commits a direct free kick offence in their own penalty area, this results in a penalty kick instead of a direct free kick. However, if the offence is an indirect free kick offence, it remains as an indirect free kick .  What offences result in an indirect free kick? ! LaTeX Error: Undefined color `BLACK' i have written all the text in black color, but i get this error several times in the same page:  ! LaTeX Error: Undefined color `BLACK'.   i tried to solve it by writting this: \definecolor{black}{gray}{0,0,0} but it didn´t work.   what should i do? Adding dynamic graphics to an animation $|p(z)| \leq M$ for $|z| \leq 1$ Show that $|p(z)| \leq M|z|^n$ for $|z| \geq 1$ Need help recalling name of sci-if story about earth evolving into electronic life forms Read a story once about earth being abandoned for long periods of time. Upon the return of man to earth all life forms, flora and fauna, have evolved into intricate electronic forms of themselves.   Would like to find that story and it's name. How do you run a 32-bit program on a 64-bit version of Ubuntu? I have a 64-bit version of Ubuntu 13.10.  I want to run a 32-bit version of a program.  However I see ia32-libs is not included in 13.10.  Is there a replacement package for this or what? How to track the number of tag wikis I edited? I want to see the number of tag wiki that I edited till now. Also I want to see which are accepted and which are rejected with the detail of all those tags. How can I know that? Also I want to know the progress for Research Assisstant badge. Code block is not properly formatted when placed immediately after a list item How do I use the Natural Earth SQLite DB with QGIS? I just downloaded the Natural Earth data in SQLite format from . I had assumed that this would be a SpatiaLite database, but it appears not to be! QGIS is failing to recognize it as a spatial database. OGR supposedly supports reading geometries even when stored in a plain SQLite database, but maybe QGIS doesn't use OGR for SpatiaLite?  The SQLite database does have geometry_columns and spatial_ref_sys tables. Is there some way to convert it to a full SpatiaLite database? Evaluating $\int_{0}^{\frac{\pi}{2}}\frac{\sqrt{\sin x}}{\sqrt{\sin x}+\sqrt{\cos x}}\, \mathrm{d}x$ When searching for the desired SE site, the down arrow key (down) should work in order to choose the site one is looking for and hit enter to visit it, instead of using the mouse point to choose it. Would be pretty convenient. What does a "real" quantum computer need for cryptanalysis and/or cryptographic attack purposes? The cryptographic world has been buzzing the word "quantum" for a while now (even the NSA is currently preparing itself for a post-quantum crypto world) and quantum-related hardware engineering is evolving constantly. For example: the 5-qubit quantum computer created at MIT by using the technique of ion traps succeeded in prime-factorizing 15. Does that mean that since it succesfully managed that, that it is a all-purpose quantum computer which could be used for cryptanalysis and/or cryptographic attacks?   If that's not the case, what exactly would a "real" quantum computer need (think: rough description of expected technical abilities, aka specs) to enable its users to use it for cryptanalysis and/or cryptographic attack purposes? And - ignoring rumours about potentially existing but confidential governmental projects - does any such system already exist today? Where can I get a device with 'Ubuntu for phones' pre-installed? Canonical has recently announced , which is Ubuntu with a specific interface for mobile devices.  Where can I get phones with this version of Ubuntu pre-installed? If no devices are available yet, where can I pre-order one? Can one of Newton's Laws of motion be derived from other Newton's Laws of motion? Can one derive Newton's  second and third laws from the first law or   first and third laws from the second law or  first and second  laws from the third  law  I think Newton's laws of motions are independent to each other. They can not be derived from one another. Please share the idea. Why are there $|G/G'|$ 1-dimensional representations of $G$? Let $G'$ be the derived subgroup of a finite group $G$.   We have a correspondence $\{\mathrm{reps \ of \ G/G'}\} \longleftrightarrow \{\mathrm{reps \ of \ G \ with \ kernel \ containing \ G' }\} $  If we restrict to 1-dimensional reps, we get:  $\{\mathrm{1\ dimensional \ reps \ of \ G/G'}\} \longleftrightarrow \{\mathrm{1 \ dimensional \ reps \ of \ G \ with \ kernel \ containing \ G' }\} $  Now my notes say that there are $|G/G'|$ 1-dimensional reps of $G$. Since there are $|G/G'|$ 1-dimensional reps of $G/G'$, this must mean that all 1-dimensional reps of $G$ have kernel containing $G'$. Why is this so?  Thanks How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script? SEO repeated keywords in domain and url plot(density(rexp(100))   Obviously all density to the left of zero represents bias.  I'm looking to summarize some data for non-statisticians, and I want to avoid questions about why non-negative data has density to the left of zero.  The plots are for randomization checking; I want to show the distributions of variables by treatment and control groups. The distributions are often exponential-ish.  Histograms are tricky for various reasons.    A quick google search gives me work by statisticians on non-negative kernels, e.g.:  .    But has any of it been implemented in R?  Of implemented methods, are any of them "best" in some way for descriptive statistics?  EDIT:  even if the from command can solve my current problem, it'd be nice to know whether anyone has implemented kernels based on literature on non-negative density estimation