I have method like this: public async Task&lt;IEnumerable&lt;DataResponse&gt;&gt; GetAsync() { ... }  I use reflection and I want to get the type &quot;DataResponse&quot;, but I get type &quot;Task&lt;IEnumerable&gt;&quot;     static void Main(string[] args)     {         var assemblies = GetAssemblies();         IEnumerable&lt;Type&gt; controllers =             assemblies.SelectMany(a =&gt; a.GetTypes().Where(t =&gt; t.IsSubclassOf(typeof(ControllerBase))));          foreach (var controller in controllers)         {             var methods = controller.GetMethods();             foreach (var methodInfo in methods)             {                 var returnType = methodInfo.ReturnType;             }         }     }  How do I get types excluding standard types (&quot;task&quot;, &quot;IEnumerable&quot;, e.t.c)?
Let's say I have a generic member in a class or method, like so: public class Foo&lt;T&gt; {     public List&lt;T&gt; Bar { get; set; }          public void Baz()     {         // get type of T     }    }  When I instantiate the class, the T becomes MyTypeObject1, so the class has a generic list property: List&lt;MyTypeObject1&gt;. The same applies to a generic method in a non-generic class: public class Foo {     public void Bar&lt;T&gt;()     {         var baz = new List&lt;T&gt;();                  // get type of T     } }  I would like to know what type of objects the list of my class contains. So what type of T does the list property called Bar or the local variable baz contain? I cannot do Bar[0].GetType(), because the list might contain zero elements. How can I do it?
php - Should I encrypt email addresses? What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally? How to change envelope from address using PHP mail? How can you reduce ambient noise from servers? series of young adult science fiction books from early 1980s about last of a race of martial experts that sees the destruction of his home planet I remember that the main character is trying to find the group that destroyed his home planet while he was on a mission. His planet was very difficult to live on and the people became expert in martial arts and were the best soldiers in the galaxy. They were mercenaries and often helped against tyrants. There was a very memorable section in at least one book about an initiation task that the main character had to do in that he had to survive in their wilderness for days. He was at some point surrounded in a old building by thousands of poisonous worm/snake creatures that he managed to survive until rescued by the leaders. Let $Q_8$ be the quaternion group. Show that $G/Z$ can never be isomorphic to $Q_8$, where $Z$ is the center of $G$. Hint: if $G/Z\cong Q_8$, show that $G$ has two abelian subgroups of index $2$.  I'm trying to prove the hint by looking at the canonical homomorphism $\pi:G\rightarrow G/Z$. Well, $Q_8$ has some abelian subgroups of index $2$, such as $H=\{1,-1,i,-i\}$, but that doesn't seem to map to abelian subgroups of index $2$ of $G$. (We know that $\pi(ab)=\pi(a)\pi(b)=\pi(b)\pi(a)=\pi(ba)$ for $a,b$ in $\pi^{-1}(H)$, but that only yields $aba^{-1}b^{-1}\in Z$, not $aba^{-1}b^{-1}=1$.) How do I show that if $f : [0,1] \to [0,1]$ is continuous, then there is some $c$ such that $f(c) = c$? Theorem: Let $f:[0,1] \to [0,1]$. Assume $f$ is continuous. Then there exists   $c \in [0, 1]$ such that $f(c) = c$.         For any function $f$, let $g(x) = f(x) − x$. If the theorem is true, what does that say about $g(c)$?   Write a proof of the theorem. Do it by applying the Intermediate Value Theorem   in the appropriate way to the function $g(x) = f(x) − x$ with $a = 0$ and $b = 1$. Clearly state why the hypotheses of the IVT are satisfied here.        Well if the theorem is true, then there exists $c$ such that $f(c) = c$. Then $f(c) - c = 0$. Then $g(c) = 0$. Intermediate Value Theorem: Let $I$ be an interval and $f$ a function whose domain contains $I$. If $f$ is continuous, then for all $a, b \in I$ with $a &lt; b$ and all real numbers $k$, if $k$ is strictly between $f (a)$ and $f (b)$, then there exists $c$ such that $a &lt; c &lt; b$ and $f (c) = k$.   Proof Attempt: Take $a = 0$ and $b = 1$. Then $a,b \in[0,1]$ and $a &lt; b$. Since $f:[0,1] \to [0,1]$, it follows that for all real numbers $k$ such that $f(a) &lt; k &lt; f(b)$, then there exists $c$ such that $a &lt; c &lt; b$ so $0 &lt; c &lt; 1$ and $f(c) = k$. Then $f(c) - k = 0$. Thus, since $g(x)=f(x)-x$, it follows that $g(c) = 0$.   Looking to see if I did this correctly and/or if there is a more elegant way to prove problem 2. I am a little confused why the first theorem is true, but I went with it. Socket Tester all indicators light up I used the above GFCI/RCD (up to 250v) socket tester on the 240v black and red live wire of the US split phase ac power system. When I connect the ground, all indicator lights (3 red) got on indicating "Live/Grd Reverse, Missing GRD" although it is connected properly.  What is inside the socket tester? Does it have a live and neutral leg such that it should only be used for ac system with polarity? How about if you use it on the red and black 240v phase to phase? Why would all the indicators light become on (3 red lights)?  The following is the specs of it:  Specifications: Brand Name: HABOTEST Color: Black Material: Flame Retardant ABS Plug Type: US Voltage: 48V-250V 45-65Hz RCD Test: >30mA (EU/UK Plug) RCD Working Voltage: 220V±20V GFCI Test: >5mA (US Plug) GFCI Working Voltage: 110V±20V Voltage Measurement: 48V~250V / 45~65Hz    Accuracy: ±(2.0%+2) Working Environment: 0°C ~ 40°C, 20% ~75%RH Storage Environment: -10°C ~ 50°C, 20% ~80%RH Safety Rating: EN61010-1,-2-030, EN61326-1,CAT II 300V Item Size: 62 * 65 * 55mm / 2.4 * 2.6 * 2.2in Item Weight: UK 64g/2.3oz, EU 59g/2.1oz, US 53g / 1.9oz Package Size: 7.5 * 7.4 * 7.3cm / 3.0 * 2.9 * 2.9in Package Weight: UK 90g/3.2oz, EU 86g/3.0oz, US 79g / 2.8oz Disable Tabbing in Firefox 3, Chrome 4 and IE8? Tabbed Browsing may be nice for reading news sites in one sitting, but I still think they are a usability nightmare if you need to keep the page open for a long time, e.g., for testing it while developing or as a reference for something.  The nice thing about the Windows Taskbar (before Windows 7 ) is that it's easy and natural to remember where things are. I can have 30 tabs in it, but because I know what each one is, I know where I have to click to open something - it's the most efficient way of working I've encountered so far.  Sadly, Tabbed Browsing completely breaks this efficiency because it is not possible to specifically click on a tab in the taskbar, I have to click on the browser, search the tab and then click it, which means at least 2 clicks.  Long story, short question: Is there an extension or setting to completely disable tabbing on Firefox 3, Chrome 4 and Internet Explorer 8 and have one Window/Taskbar entry for each open page? I know that in Chrome I can just drag a tab out of a Window to create a new one, but if there is a general way, that would be easier.  Edit: IE8 conveniently offers an option for that: Tools - Options - Tabs - Enable Tabbed Browsing. Movie Identification - 1990s VHS Sci-Fi/Horror How many times can I benefit from Advantage if I attack multiple times while not seen? A hidden ranger with Extra Attack attacks a surprised creature. Do both attacks benefit from Advantage, or just the first one?  If the ranger used Horde Breaker on another creature, would this attack benefit from Advantage? Changing the style of the first *typeset* line of a paragraph Evaluate the sum $\sum_{k=1}^n {n \choose k-1} {n \choose k}$ Evaluate the summation of: $$ \sum_{k=1}^n {n \choose k-1} {n \choose k} $$ I have been trying to solve this problem by translating C(n, k-1) into C(n, k), because I know that: $$ \sum_{k=1}^n {n \choose k}^2={2n \choose n} $$ However, I haven't been having any luck. Am I on the right track? What am I doing wrong? Does Blender support dual-GPU rendering if the two GPUs aren't the same? I have a GTX 1060 6GB in my current build, and I also have a GTX 960 2GB in storage. I was wondering if I got , and got both of my GPUs in one build (not SLI or CrossFire, just in the same system) would I be able to use both GPUs for rendering simultaneously? I don't care if this means having them both render separate tiles in one instance of Blender, or rendering separate frames in two instances. I'm using Cycles for everything I do. Solve $x^2$ $mod$ $23 = 7^2$ What is the procedure to solving $x^2$ $mod$ $23 = 7^2$? According to WolframAlpha, there is no integer solution but I am completely confused as to what steps was taken to determine that.  Before asking the question, I did try to solve this using brute force by plugging in some arbitrary numbers to see whether the square of that number mod $23$ gave me a remainder of $49$ but the procedure was quite tedious. Hence the reason I turned to WolframAlpha.   Going back to the question, I want to know how WoflramAlpha determined that there was no integer solution to solving for $x$. Say I have a code to draw a flow chart, I want now a arrow from node 3 to node 1, how can I do that?  1&lt;--| |   | 2   | |   | 3----   MWE  \documentclass[class=article,border=0pt]{standalone}  \usepackage{tikz} \usetikzlibrary{shapes,arrows}  % Define block styles \tikzset{     block/.style={rectangle, draw, line width=0.5mm, black, text width=5em, text centered,                   rounded corners, minimum height=2em},     line/.style={draw, -latex} }% &lt;- if you insist in using this in the document add this % here. \begin{document} \begin{tikzpicture}[node distance = 1cm, auto]     % Place nodes     \node [block] (BLOCK1) {a};     \node [block, below of=BLOCK1] (BLOCK2) {b};     \node [block, below of=BLOCK2, node distance=1cm] (BLOCK3) {c};     % Draw edges     \path [line] (BLOCK1) -- (BLOCK2);     \path [line] (BLOCK2) -- (BLOCK3); \end{tikzpicture} \end{document} How to build a single virtual machine on top of multiple computers? Is there a way to run Linux operating system on a virtual machine which aggregates the resources of physical machines on the local network and acts as a single super-computer? If possible, how?  Thanks. I am creating a chat using Ajax requests and I'm trying to get messages div to scroll to the bottom without much luck. I am wrapping everything in this div: #scroll {     height:400px;     overflow:scroll; }  Is there a way to keep it scrolled to the bottom by default using JS? Is there a way to keep it scrolled to the bottom after an ajax request? "one of the cables that runs" or "one of the cables that run"? Recently at work I was writing the following, and I have not been able to get a firm answer on which version is the most grammatically correct. The sentence is:     We would like to use one of the cables that _________ between rooms.   Is the correct conjugation run or runs?  I think 'run' is correct, because I think that the verb in the prepositional phrase is referring to 'cables' not 'one.' However, a number of colleagues have said that 'runs' is correct because one is singular. I wonder how a researcher send an unsolicited email to another one asking for feedback to their work. I guess it will be something like this?  Hello Dr. X To introduce myself, I am Y, in institute Z. I'm sorry if this email is not convenient at this time, but my work about A is highly relevant to your work in B, so I think it will be interesting to you too. If possible, can you take a look at it and tell me what you think? Here is the link:  Thank you for your reading, hope you enjoy it.  I wonder if the summary/abstract should be included in the email too, since the principle for  is to show everything you know about it. Maybe it's not necessary, since the title of the link should prove its interestingness nevertheless? I'd like to have your confirm. I'm also interested in the case where Y has no Z, and the link is just a collection of observations posted in a blog, not a full paper with proper citation and literary review. It is possible that the observations may have been covered in the field, but Y isn't aware of that yet. I also think that if the link is interesting enough, then putting a tracking method in there is fine too? Even if they finds out, they wouldn't feel insulted either, because they find that the link is indeed interesting.  Related: •  •  •