List all extensions of an object With object.GetType().GetMethods() you can list all methods of an object. How can you list all extensions of an object ?  For example :  I have this extension  public static void DoSomething(this MyObject obj, String param) {}   Is there a way to retrieve DoSomething method of object MyObject using reflections or an other method ?
Reflection to Identify Extension Methods In C# is there a technique using reflection to determine if a method has been added to a class as an extension method?  Given an extension method such as the one shown below is it possible to determine that Reverse() has been added to the string class?  public static class StringExtensions {     public static string Reverse(this string value)     {         char[] cArray = value.ToCharArray();         Array.Reverse(cArray);         return new string(cArray);     } }   We're looking for a mechanism to determine in unit testing that the extension method was appropriately added by the developer.  One reason to attempt this is that it is possible that a similar method would be added to the actual class by the developer and, if it was, the compiler will pick that method up.
Irreducible polynomials and affine variety Let $k$ be any field, and let $f,g\in k[x,y]$ be two irreducible polynomials such that $g$ is not divisible by $f$. Prove that $V(f,g)\subseteq A_k^2$ is finite. How to count occurrences of one field grouped by values of another? Is there a way of calculating the number of unique text strings in a field in ArcGIS 10.1? I have a number of repeated strings in this field, but would like to calculate the number of unique strings in a field based on groupings from another field.  E.g  - Current table:  Field 1    Field 2    Apple      Green      Apple      Red        Apple      Red Citrus     Yellow Citrus     Green Citrus     Orange Citrus     Orange   Result:  Field 1    Field 2 Apple      2 Citrus     3 How can I send an email using a template? I have created a email template in ExactTarget API and I want to use it executing XML from SoapUI.  Is there any tutorial or examples of how can this be done?  I'm new at this and I'm not sure how ExactTarget really works. I've just set up a new machine with Ubuntu Oneiric 11.10 and then run  apt-get update apt-get upgrade apt-get install git   Now if I run git --version it tells me I have git version 1.7.5.4 but on my local machine I have the much newer git version 1.7.9.2  I know I can install from source to get the newest version, but I thought that it was a good idea to use the package manager as much as possible to keep everything standardized.  So is it possible to use apt-get to get a newer version of git, and what is the right way to do it? It's time for drag and drop! I often find myself wishing SO supported drag and drop. For example I drag a tag to my favs and it would add it, or when searching by tag I would like to drag the tag to the search box and get [asp.net] added in the search box.   Does it make sense to add this feature or is it just too much work for so little use? Steps to Reproduce   Tap faster on the code. or Tap once on a huge code.   but happens only when  setupForGeneric() is called, might be a bug related to   private void setupForCode()   { String str = getIntent().getStringExtra("com.stackexchange.marvin:code_block"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.setPostBody("&lt;pre&gt;&lt;code&gt;" + TextUtils.htmlEncode(str) + "&lt;/pre&gt;&lt;/code&gt;", false); localPrettyWebView.setBackgroundColor("#eeeeee"); }  private void setupForGeneric() { String str = getIntent().getStringExtra("com.stackexchange.marvin:web_url"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.getSettings().setBuiltInZoomControls(true); localPrettyWebView.getSettings().setLoadWithOverviewMode(true); localPrettyWebView.getSettings().setUseWideViewPort(true); localPrettyWebView.loadUrl(str); localPrettyWebView.setBackgroundColor("#eeeeee"); }   Log  09-05 03:54:30.312: E/AndroidRuntime(26264): FATAL EXCEPTION: WebViewCoreThread  09-05 03:09:39.522: E/Crittercism(18318): java.lang.NullPointerException: [v0.1.22]  09-05 03:09:39.522: E/Crittercism(18318):   at android.content.ComponentName.&lt;init&gt;(ComponentName.java:75) 09-05 03:09:39.522: E/Crittercism(18318):   at android.content.Intent.&lt;init&gt;(Intent.java:3156) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.ViewPopupActivity.showCode(ViewPopupActivity.java:25) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.question.QuestionFragment$1.onCodeClicked(QuestionFragment.java:67) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.common.PrettyWebView$WebAppInterface.codeClicked(PrettyWebView.java:197) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.access$4000(WebViewCore.java:59) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1449) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Handler.dispatchMessage(Handler.java:99) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Looper.loop(Looper.java:137) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:790) 09-05 03:09:39.522: E/Crittercism(18318):   at java.lang.Thread.run(Thread.java:856) How to make the taskbar blink my application like Messenger does when a new message arrive? Is there an API call in .NET or a native DLL that I can use to create similar behaviour as Windows Live Messenger when a response comes from someone I chat with? The Complete Rate-Limiting Guide I noticed that I can only perform certain actions such as commenting a finite number of times in a given period of time. Obviously, rate limiting is in place to prevent accidental misuse or intentional abuse of certain features.  Where else is rate limiting applied on Stack Exchange sites, and what are the limits? Installing QGIS with ECW support on Mac? Does shoving a creature break its grapple on another? A situation came up in my session where a fighter used his Shield Master Shove feature to shove a Giant Crocodile that was currently restraining another PC using it's bite+grapple ability.  I did a quick check at the time and did not find anything related to shove, although in the  condition description it states:     The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect, such as when a creature is hurled away by the thunderwave spell.   I ruled at the time that a shove would count in a similar way to being "hurled away" however I wasn't sure and said I would find more concrete information for the future.  I have searched high and low for somebody else asking this specific question but have yet to find it. I saw some reference to a Jeremy Crawford tweet about involuntary movement and grappling however I am unable to find it.  If a third party "shoves" a creature that is grappling another, does it only shove the grappler away, or does it move both the grappler and grappled?  I drew a diagram:   (; this question relates to if a third party shoves the grappler instead, so it's not a duplicate.) Does $\sum_{n=1}^\infty \frac{\cos{(\sqrt{n})}}{n}$ converge? In Windows, if you right-click a .bat file, there's an "Edit" option, which opens the .bat file with notepad. How do I make Windows use Notepad++ instead?  Note that this is different from the question . In that question, user asks for a way to make Notepad++ the default opener for specific file types. This is not what I want here, since I expect that double-clicking on .bat files executes them. what is beeping in my house? I know this sounds like a silly question and it may be closed before it may get a single answer but there is something strange in my house which beeps infrequently. I tried to troubleshoot the sound but no luck. I thought may be its coming from the living room but there is nothing special in the living room which may make a beep sound.  Can someone point me what should i look for to figure out what is making this sound? Extracting phone number from string My account has been temporarily suspended; what does that mean? My account has been , besides the following restrictions:  an account will be locked at 1 reputation the user page will have a visual indication that the account is in timed suspension, and for how long the account holder will be unable to vote, ask, answer or comment  What else does timed suspension prevent me doing? For example, can I still edit my own posts or delete content? And what is a network-wide suspension? How prove this two symmetric matrices $AB=0$ Let $A,B$ be real symmetric matrices, and for any $n\in \Bbb N^{+}$, and for all $x,y\in \Bbb R$, we have $$tr(xA+yB)^n=x^ntr(A^n)+y^ntr(B^n).$$  Show that $AB=0$.  My try:since $$(xA+yB)^n=x^nA^n+\binom{n}{1}x^{n-1}A^{n-1}yB+\cdots+\binom{n}{n-1}xA(yB)^{n-1}+y^nB^n$$ so $$tr\left(x^nA^n+\binom{n}{1}x^{n-1}A^{n-1}yB+\cdots+\binom{n}{n-1}xA(yB)^{n-1}+y^nB^n\right)=x^ntr(A^n)+y^ntr(B^n)$$  then  $$tr\left(\binom{n}{1}x^{n-1}A^{n-1}yB+\cdots+\binom{n}{n-1}xA(yB)^{n-1}\right)=0$$ so $$\binom{n}{1}x^{n-1}ytr(A^{n-1}B)+\cdots+\binom{n}{n-1}xy^{n-1}tr(AB^{n-1})=0$$ then I can't  I found this is a nice result, maybe this is an odd problem, and I can't solve it. Thank you. I'm looking for a word that applies to all the things a person can wear, e.g. clothes, shoes, accessories, etc. It musn't be too generic, e.g. product, item, etc. Determine the set of points $z$ that satisfy the condition $|2z|>|1+z^2|$ Determine the set of points $z$ that satisfy the condition $|2z|&gt;|1+z^2|$  I tried to redo this problem and got to this point  $|2z|&gt;|1+z^2|$ $\Rightarrow$ $2|z|&gt;1+|z^2|$ $\Rightarrow$ $2|z|&gt;1+z\overline z$  Let $z=x+iy$ then   $$2\sqrt{x^2+y^2}&gt;1+(x+iy)(x-iy)$$  $$2\sqrt{x^2+y^2}&gt;1+(x^2+y^2)$$  $$0&gt;1-2\sqrt{x^2+y^2}+(x^2+y^2)$$  $$0&gt;(1-\sqrt{x^2+y^2})^2$$  since $x,y$ are real number , so there is no solution for this inequality? How can I use adb to send a longpress key event? When I view most glass from the side it's green which I've found out is due to impurities in the glass specifically from iron oxide. Why is it when I view the larger face from an oblique angle, it isn't nearly as green? I cannot personally notice any different on the piece I have next to me even when I hold it at an angle that would be almost looking at the edge of the glass. It is pretty small (about 2.5" x 5" x .0625" or about 61mm x 127mm x 2mm, l x w x h) but I feel like it's big enough that I'd be looking through enough glass to get the green.