I have a method with the following signature:      private string SerialiazeObj&lt;T&gt;(T obj)     {           // Do some work     }   Now, I have another method which accepts an object and calls the SerializeObj method, as shown below:      private void callSerializeObj(object obj)     {         Type objType = obj.GetType();         string s = SerialiazeObj&lt;objType&gt;((objType)obj));     }   The object passed to callSerializeObj can be of any type.  Unfortunately, the compiler is giving me this error in the (string s = SerializeObj...) part:  The type or namespace 'objType' could not be found (are you missing an assembly reference).   I don't know if I am calling SerializeObj the correct way.  What is the correct way of calling the method with an object which can be of any type?
What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod&lt;T&gt;() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod&lt;T&gt;()?         GenericMethod&lt;myType&gt;(); // This doesn't work          // What changes to call StaticMethod&lt;T&gt;()?         Sample.StaticMethod&lt;myType&gt;(); // This also doesn't work     }      public void GenericMethod&lt;T&gt;()     {         // ...     }      public static void StaticMethod&lt;T&gt;()     {         //...     } }
Spaces in which "$A \cap K$ is closed for all compact $K$" implies "$A$ is closed." Let $X$ denote a topological space. For any $A \subseteq X$, consider two possible conditions on $A$.   $A$ is closed $A \cap K$ is closed, for all compact $K \subseteq X$.   If $X$ is Hausdorff, then clearly (1) implies (2). If $X$ is metrizable, then the converse holds; see .     Questions.         What are some Hausdorff topological spaces in which (2) does not   imply (1)?   For Hausdorff topological spaces: what weaker conditions than metrizability are known to imply that (2) implies (1)? Are there any interesting characterizations of those Hausdorff spaces in which (2) implies (1)? I took a look at my profile, where I stuck my flair. Here's the flair:    However, I don't have 28k rep. According to chat, I have 19.7k.  Note: I know about the combined flair - I've had this in my profile for at least a year. It had been showing me the same as in chat, now it isn't.   What is going on here?  Edit: I'm reporting a bug here, that the combined flair is not showing the correct number, as it has in the past. XML DML for 2008 R2..How to modify nested Elements Show that a holomorphic function satisfying $|f(z)|\leq c|z|^n$ must be $f(z)=a\cdot z^n$ for some a. Let $f:\mathbb{C}\to\mathbb{C}$ be a holomorphic function such there exists a $c\in\mathbb C$ with $|f(z)|\leq c\cdot |z|^n$ for all $z\in\mathbb C$. Show that there exists an $a\in\mathbb C$ with $f(z)=a\cdot z^n$.   Proof.  My general idea is to show that the taylor series only has one non-zero coefficient:  $\displaystyle |a_k|\leq\frac{k!}{2\pi}\oint_{|w|=r}\frac{|f(w)|}{|w|^{k+1}}dw\leq \frac{k!}{2\pi}\oint_{|w|=r}\frac{c\cdot|w|^n}{|w|^{k+1}}dw\leq \\\displaystyle\leq \frac{c\cdot k!}{2\pi}\oint_{|w|=r}|w|^{n-k-1}dw$  Now using the standard estimate since $\oint=2\pi r$:  $\displaystyle \leq c\cdot k!\cdot r^{n-k}\longrightarrow\begin{cases}0,\ k&gt;n\\c\cdot n!,\ k=n\\ \infty,\ k&lt;n\end{cases}$ as $r\to\infty$  In conlusion the taylor series for now looks like $f(z)=\sum_{k=0}^{n-1}a_k z^k+ a_n z^n$ with $|a_n|\leq n!\cdot c$. What do I do with the remaining summands?  Edit: I would say that for $k&lt;n$ we have $|z|^k&gt;|z|^n$ for $z\in D_1(0)$. So since the estimate has to hold for all $z\in \mathbb C$ we can't have that either. I downloaded Linux CAPT driver V2.60 from Canon and installed both .deb packages, which were listed under the 64bit folder with Ubuntu Software-Center. My Canon printer still won't be recognized. Is there anything else I have to do? My printer is connected over USB.  Ubuntu would make a great replacment for my office, but unfortunately without printer support I will still rely on Windows. Is it possible for a familiar to attune to and then wear or wield a magic item? My dad's old TV! When I switch it off after watching and get my hands closer, my hands' hair gets attached to the screen. And they stick for sometimes! Now, I know how a cathode ray oscilloscope works. It is just the clever use of Hall - Effect . But why does my hair get stuck to the screen? What is the cause? Note, I checked this for my LED TV but it didn't work (I couldn't perceive anything) unknowingly. What's the magic in my old TV?? Design for Facebook authentication in an iOS app that also accesses a secured web service Show that $\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) = \sum_{i=1}^n (x_i - \bar{x})(y_i)$. Show that $\sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y}) = \sum_{i=1}^{n} (x_i - \bar{x})(y_i)$. I fell into this hole where I keep finding that $$\sum_{i=1}^n (x_i - \bar{x}) = \sum_{i=1}^n x_i - \sum_{i=1}^n \bar{x} = n\bar{x} - n\bar{x} = 0$$ This seems true, but I know that I am missing something, since this implies that covariance is always zero, which is obviously not true. Split-like environment inside cases environment I'd like to have a cases environment with some cases that are too long to fit on one line. I tried this:  \begin{cases}   \begin{split}     long expression \\ second line of long expression   \end{split} &amp; condition \\   ...   but I get the warning     Package amsmath Warning: Cannot use 'split' here;   trying to recover with 'aligned' on input line 201.   It automatically replaces the split with an aligned environment, which looks like this:    Is there any way to get these long expressions to behave like they were in split or multline environments, with the top line flush left and the next line indented a little? Why does pressing a transform hotkey not display the axes on the selected object? I open Blender 2.80 (official release, not a beta or RC) and get the new scene with the usual 3 objects present (camera, light and cube). I select the cube, press 't' for the tools menu and click on the Move tool. The usual 3 axis glyph appears at the cube's origin as expected. But if I use the hotkey 'g' to activate the move transform instead of selecting the tool from the menu with the mouse this glyph does not appear. The exact same problem exists if I use the a hotkey for rotate or scale as well. Why? Is there some clickable checkbox setting hidden somewhere that could have disabled this? implicit operator using interfaces I have a generic class that I'm trying to implement implicit type casting for.  While it mostly works, it won't work for interface casting.  Upon further investigation, I found that there is a compiler error: "User-defined conversion from interface" that applies.  While I understand that this should be enforced in some cases, what I'm trying to do does seem like a legitimate case.  Here's an example:  public class Foo&lt;T&gt; where T : IBar {     private readonly T instance;      public Foo(T instance)     {         this.instance = instance;     }     public T Instance     {         get { return instance; }     }     public static implicit operator Foo&lt;T&gt;(T instance)     {         return new Foo&lt;T&gt;(instance);     } }   Code to use it:  var concreteReferenceToBar = new ConcreteBar(); IBar intefaceReferenceToBar = concreteReferenceToBar; Foo&lt;ConcreteBar&gt; concreteFooFromConcreteBar = concreteReferenceToBar; Foo&lt;IBar&gt; fooFromConcreteBar = concreteReferenceToBar; Foo&lt;IBar&gt; fooFromInterfaceBar = intefaceReferenceToBar; // doesn't work   Does anyone know a workaround, or can anyone explain in a satisfactory way why I shuouldn't be able to cast interfaceReferenceToBar implicitly to Foo&lt;IBar&gt;, since in my case it is not being converted, but only contained within Foo?  EDIT: It looks like covariance might offer salvation.  Let's hope the C# 4.0 specification allows for implicit casting of interface types using covariance. Find all positive integers $n$ such that $n$ is divisible by all the positive integers less than or equal to $\sqrt{n}$ Find all positive integers $n$ such that $n$ is divisible by all the positive integers less than or equal to $\sqrt{n}$  My thought: If n is a positive integer, let d(n) denote the number of positive divisors of n and I will find n such that $d(n) \ge 2\sqrt{n} - 1$ Order of calling base class constructor from derived class initialization list What is the promotion rate of professors in United States? I'm writing an essay, and want to know the promotion rate and average duration from assistant professor to associate professor and associate professor to professor in recent years. Sadly I don't know the data for the US. Could anyone tell me? Prove $-(-a)=a$ using only ordered field axioms How to run/use popcorn-time? I got popcorn time installed using this link:    But I have no clue how to use or run Popcorn time.  Do I open my torrent client and download a movie and then it gets going? or do I have to open it? If I have to open it, how do I do that, I opened the dash and tried clicking on it but nothing happened. Please help me!! :D Why is $\mathbb{C}[x,y]/(y^2 - x^3 + 1)$ normal? How do I create a file of size 10M, format it with ext3 filesystem and then mount it in /media/fuse?  I tried with  mkfs -t ext3 file   then to mount it  mount -t ext3 file /media/fuse   It didn't work because it said that file wasn't a block device. Can anybody help me? On the hardness of data to learn Almost in all texts which are discussing theorems of statistical learning, they assume analyzing arbitrary unknown distribution (the worst case). But in practice different problems (different data) have different levels of hardness, for example linear separable data is easier to learn than the data that are less (or not) separable by hyperplanes.  Are there any works on formalizing the hardness of data (similar to the stuff done in complexity theory)  Note: I am not sure if the same as analyzing VC-dimension or not, but I think it is not.