Why are my LED weak?
Raspberry Pi + IRFZ44N to control a 5050 RGB LED strip: current seems to be limited
Edit:  Of course my real code doesn't look exactly like this. I tried to write semi-pseudo code to make it more clear of whay I wanted to do.  Looks like it just messed things up instead.  So, what I actually would like to do is this:  Method&lt;Interface1&gt;(); Method&lt;Interface2&gt;(); Method&lt;Interface3&gt;(); ...   Well ... I thought that maybe I could turn it into a loop using reflection. So the question is: How how do I do it. I have very shallow knowledge of reflection. So code examples would be great.  The scenario looks like this:  public void Method&lt;T&gt;() where T : class {} public void AnotherMethod() {     Assembly assembly = Assembly.GetExecutingAssembly();      var interfaces = from i in assembly.GetTypes()     where i.Namespace == "MyNamespace.Interface" // only interfaces stored here     select i;      foreach(var i in interfaces)     {         Method&lt;i&gt;(); // Get compile error here!     }       Original post:  Hi!  I'm trying to loop through all interfaces in a namespace and send them as arguments to a generic method like this:  public void Method&lt;T&gt;() where T : class {} public void AnotherMethod() {     Assembly assembly = Assembly.GetExecutingAssembly();      var interfaces = from i in assembly.GetTypes()     where i.Namespace == "MyNamespace.Interface" // only interfaces stored here     select i;      foreach(var interface in interfaces)     {         Method&lt;interface&gt;(); // Get compile error here!     } }   The error I get is "Type name expected, but local variable name found". If I try  ...     foreach(var interface in interfaces)     {         Method&lt;interface.MakeGenericType()&gt;(); // Still get compile error here!     } }   I get "Cannot apply operator '&lt;' to operands of type 'method group' and 'System.Type'" Any idea on how to get around this problem? QGIS color polygon according to points I have two layers. Layer 1 contains points (x,y) and layer 2 contains one polygon. All points in layer 1 are positioned within the polygon of layer 2. The points in layer 1 contain an attribute with information on the topography/elevation at the specific point. Can I color the polygon in layer 2 based on attributes from the points in layer 1 in order to create an elevation map? I'm finishing professional school and over the years have acquired a pile of notes and articles that I'd like to hang onto.  I'd like to add to them and create sort of an archive of article and files that may be useful down the road.  I'd also like to organize this collection of files not only by simple grouping but also with tags.  I feel like that will make searching through them years later much easier.  Suggestions on software that would be good for this?  Just a general file manager, something that uses tags that can be attached to each file? Is there a free site to play Yu-Gi-Oh? I always used to open a new VLC window; go to "open file"...etcetera when I wanted to watch something because when I click on a file in Windows Explorer and chose "open with" or just clicked on the file or right-clicked to choose "play with VLC" it always opened in an old already used VLC window.  Is there any way to get VLC to use a new one without always resorting to: Open VLC, "open file", find file etcetera? Pivot in sql server Difference between pre-increment and post-increment in a loop? Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing? Why don't wizards always use multiple wands? The Half-Elven and their choices I have a DB Server running CentOS 6.4 and MySQL 5.5 from RPMs (not source).  I have dozens of databases but one of them is being hit quite hard with large selects which locks out other updates which in turn locks out other selects (at least I think this is what's happening!)  To alleviate this I would like to replicate one of the databases onto the same server so that the writes can write to the "master" and reads can be done on the "slave". I don't have the luxury of additional hardware.  I have found a lot of guides on the internet describing how to replicate to a different server, and one () describing how to replicate to the same server but it doesn't seem to be geared towards retrofitting this functionality to an existing database with 10s of GB of data in it already. It also talks about compiling MySQL from source.  Does anyone know how I can retrospectively convert my MySQL 5.5 config to replicate one of my databases on the same server?  My existing DB runs on port 3306 so I feel it should be as easy as firing up another instance of MySQL on port 3307 and making some changes to my.cnf but not sure what changes.  Thanks in anticipation. How to create a site in a sitecollection on a remote SPServer using C# Add Virtualbox Shortcut in Unity Launcher to boot to a VM Can I create a shortcut to a virtualbox OS in the unity sidebar without it being on the desktop too.  I tried to right click in virtualbox and create shortcut on desktop then move it. but if i do it then delete the desktop shortcut it renders the unity shortcut useless.  Any ideas? How is effect precedence determined? I was using  and my opponent has a . I attacked Sylvanas, fearing that the Deathrattle will take control of one Hyena. I feel lucky, because it did not happen.  I want to know if there are some general rules of effect precedence.   Has Blizzard published something about this?  Are there articles teaching about precedence?   Please note, I want guidance about effect precedence in general, not just about Deathrattle. Why do paintbrush loops get thicker at the top in Illustrator? When I do swirls in Illustrator with the paintbrush tool I often get this result (see image).    The loops doesn't get perfectly rounded, instead sometimes some of them gets thicker at the top of the loop... It tends to happen more if I paint small with low brush sizes. Why is this happening? I just made a minor , and  the grammar correction was unnecessary.  The original text was     Another factor--sometimes life happens and you can't fly. In the old days you could simply sell your ticket to someone else, now you either have to eat a hefty change fee or lose it outright. That's money in their pockets that they didn't used to get.   It was corrected to:     Another factor--sometimes life happens and you can't fly. In the old days you could simply sell your ticket to someone else, now you either have to eat a hefty change fee or lose it outright. That's money in their pockets that they didn't use to get.    Was this grammatical correction an improvement? Was the original text grammatically correct? Is the edited text grammatically correct? Great Expectations [is written vs has been written] by Charles Dickens I've been riding a mountain bike for years, but I prefer to go longer distances on paved ground, so I think a road bike would be better. When I ask what is a good bike, I don't need brands or models - more like what components of the bike should I look for, and what should I avoid? Additionally, is it necessary to "go big or don't go at all" as far as spending - getting a real good quality road bike for $500 to a few thousand, or should I cheap out on a $100-200 road bike, as it is my first, then get a better one when I'm more experienced? At this point, I am unclear as to how to handle encounter XP. Does each surviving party member receive a proportional share, or the full amount? That is, assume a 4-character party had completed an encounter worth 400 XP. Would each party member receive 100 XP, or 400 XP? I need to get MODIS NDVI (MOD13A3), but output from EarthExplorer or Daac2Disk HDF format is a numerical range is -2000 to 9996.   But I need for futher work basic range -1 to 1.   Is there any conversion method? Bolzano-Weierstrass Theorem Proof Abbott (Ax. of Choice) In Abbott's Proof of the Bolzano-Weierstrass Theorem, does Abbott use any form of the Axiom of Choice ?   I think he is since he chooses an $a_{n_k} \in I_k$ where there are multiple such $a_{n_k}$.