I ran Code Analysis on one of my projects, and it gave me two finger wags, namely:  CA1063 Implement IDisposable correctly Provide an overridable implementation of Dispose(bool) on 'UserStore' or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.  ...on this line of  code:  public class UserStore : IUserStore&lt;User&gt;, IUserPasswordStore&lt;User&gt;,  IUserClaimStore&lt;User&gt;   ...and this:  CA1063 Implement IDisposable correctly Modify 'UserStore.Dispose()' so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in Visual Basic), and then returns.  ...on my empty Dispose:  public void Dispose() {     // }   Can I assassinate two avians with one petrified dirtclod by doing this:  public override void Dispose() {     Dispose(true);     GC.SuppressFinalize(this); }   ? Is that what it's suggesting?  UPDATE  To answer my question (sort of), apparently not - I figured I'd just add the code and see if the Code Analysis would then feed back the yearned-for "'NRBQ.API.UserStore.Dispose()': no suitable method found to override"
I know from reading  that the "primary" use of the IDisposable interface is to clean up unmanaged resources.  To me, "unmanaged" means things like database connections, sockets, window handles, etc.  But, I've seen code where the Dispose() method is implemented to free managed resources, which seems redundant to me, since the garbage collector should take care of that for you.  For example:  public class MyCollection : IDisposable {     private List&lt;String&gt; _theList = new List&lt;String&gt;();     private Dictionary&lt;String, Point&gt; _theDict = new Dictionary&lt;String, Point&gt;();      // Die, clear it up! (free unmanaged resources)     public void Dispose()     {         _theList.clear();         _theDict.clear();         _theList = null;         _theDict = null;     }   My question is, does this make the garbage collector free memory used by MyCollection any faster than it normally would?  edit:  So far people have posted some good examples of using IDisposable to clean up unmanaged resources such as database connections and bitmaps.  But suppose that _theList in the above code contained a million strings, and you wanted to free that memory now, rather than waiting for the garbage collector.  Would the above code accomplish that?
How to integrate $\int\sqrt{x^2+1}dx$ What does "\" mean in math In a Linear Algebra textbook I am reading, the following is stated: $b\notin \operatorname{span}(A \cup \{a\})\setminus \operatorname{span}(A)$. It does so without explaining what "$\setminus$" means. I apologize if this question does not belong here but I just want to understand what it means. I can close the question if someone just comments on its meaning. When will my device get the Android 4.1 update (Jelly Bean)? Android 4.1 (Jelly Bean) was announced at Google I|O 2012 on June 27, 2012.  (You can review  at the official Android Developer's site.)  Of course, not all devices will get this update right away and others won't get it at all. Each manufacturer and carrier often choose to add their custom modifications which tend to delay the official release.  When will each device get Android 4.1, either officially or unofficially, if ever?  See also: What computer components are currently vulnerable to magnets? When I first started using computers, law of the land in computer class was never bring magnets near anything computer related, lest you lose all your data or screw up your monitor.  Now I am pretty sure magnets will still royally mess up a standard hard drive, and I know for a fact they screw up a CRT monitor.  Though I am also pretty sure they do not screw up a LCD monitor?  Now I have my phone which uses magnets to determine if it's docked, and it made me wonder.  Is it the power of the magnet preventing data loss or the sheer fact that whatever memory type in the phone is immune to it?  What about ear buds, as I know those have tiny magnets in them. Are those capable of damaging any electronic device currently in use?  I'm wondering if I'm being paranoid, but I really am not sure what magnets will damage and what they won't!  Is there a list, or rule of thumb for determining what will be hurt by magnets and what won't be? What do you call a person who is your friend only because you benefit them? Looking for a word to describe a person who only makes friends to benefit themselves. Unity-like Dashboard for Gnome fallback? Is there any way I can run the Unity dashboard (or something similar, like Bolt for Gnome 3) in Gnome Fallback? MacBook Pro never goes to sleep I got a brand new mid-2015 MacBook Pro 15", OSX 10.11.3.  Display never turns off even it is configured to turn off after 10 mins in power adapter AND in battery mode. Screen saver (aerial) stays active forever. I tried disconnecting all USB peripherals connected - it did not help.  Any ideas? It appears that Unity on Raring only comes with a single virtual desktop (aka workspaces) by default, and CCSM's Wall plugin has no way to add more. Is this configurable at all? I took several statistics courses in college but I found that my education was very theory driven.  I was wondering if any of you had a text in Applied Statistics (at the graduate level) that you recommend or have had good experience with. How do I parse a string to a float or int? In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or parse the string "31" to an integer, 31?  I just want to know how to parse a float str to a float, and (separately) an int str to an int. I am a Canadian citizen, and I intend to travel to the US for a student clinical elective at a university in Texas for the months of September and October. The university will help me obtain an F-1 status. However, I want to attend a few conferences and educational seminars which are being held in November/December for which I will be using a B1/B2 visa.  Will I have to leave the US and come back in November using a B1/B2 visa, or is there another way to change my visa status, or can I apply for both visas upon entering the US? Coding for an ordered covariate I am performing ordinal regression, I have 5 response categories and several predictors both continuous and categorical. I would like to add a predictor which is categorical but ordered (1, 2, 3, 4). I don't think it would be appropriate to apply the usual dummy coding for unordered categorical predictors, but when I searched for how to code this I did not find much information.  In  "linear coding" or "assuming linearity of the predictor effect" is mentioned, but without further details.  Does it mean I just use my ordered values as they are, i.e. use them as a continuous variable? How can I "group by" and sum a column in excel? I'm trying to figure out how to "group by" values in an Excel spreadsheet.  Given the following example (this is an inventory sheet I use at my restaurant:)    At the far right of the spreadsheet there is a column named Cost of Goods Sold.  I would like to be able to come up with a total COGS figure for each Category.  Is this possible in excel? Moreover, I'd like to do it in a separate worksheet so that the first worksheet (what is pictured) isn't affected.  Any ideas?  Thanks! I am using Adobe Illustrator CS6 to create small images (like icons) for my app so I need pixel precision.  How can I avoid X, Y, W and H properties to have decimals? Can I configure 0 decimals for this properties on my document?  If I use the textboxes with this properties it does right, it increases pixel by pixel, but when draggin with the mouse it uses up to 3 decimals. I am having trouble with (a) and (b):  I evaluated (a) and I got that sun of the first three terms does not equal $\ln(5/8)$. I got that it is equal to $\ln(3/4) + \ln(2/3) + \ln(15/16)$ which is not equal to $\ln(5/8)$.  I am also having trouble with part (b). I cannot figure out how to calculate the math to cancel out the $(k+1)^2$ and turn it into $2(n  +1)$.  Any help would be amazing. For sets $A,B$, let $|A|\leq^*|B|$ say that there exists an onto map $f:B\rightarrow A$ or $A=\emptyset$.   My question is, is $$\forall A,B(|A|\leq^*|B|\longrightarrow |A|\leq|B|)$$ equivalent to the axiom of choice?  Thanks Prove that $r \in R$ such that $0 \lt r \lt 1$ then $\frac{1}{r (1 - r)} \ge 4$ I have an external HD which used to be my TimeMachine drive. I got a different drive for that, so I want the original drive back as an external on my Windows box, but it has this random 200 MB partition labeled as EFI System Partition. How do I get rid of this? If you're not used to seeing the 'low on internal storage' notification, what is it that you're doing to keep your phone's internal memory from filling up so quickly?   The 'SD Card and Phone Storage' menu in the settings doesn't really tell me much other than how much is free. And, I don't really have that many applications installed. The top 5 storage hogging apps on my phone are Gmail (18.6 MB), Twitter (17.5 MB), Facebook (12.55 MB), Maps (9.63 MB), and Swype (6.06 MB).  So, are there apps out there (besides your normal file manager ones, like Astro) that will help monitor internal phone storage? Is there something I should be doing to keep my phone storage use to a minimum? How to monitor process/program execution in windows? We are trying to develop a small application that can monitor the programs/processes that are executing in a windows machine.  If the program/process is not supposed to run, it should be blocked. It works similar to an antivirus.  This is the basic idea.  I want to know the ways to hook into the OS to get notified about every single program/process trying to run in the machine.