private void Extractions(string htmlFileName, int offLineFileNumber, bool onlineOffline)         {             if (onlineOffline == false)             {                 OffLineDownload.offhtmlfiles();                 page = OffLineDownload.OffLineFiles[offLineFileNumber];                 byte[] bytes1 = File.ReadAllBytes(page);                 page = Encoding.GetEncoding(1255).GetString(bytes1);                 TextExtractor.GetDateTimeList(page);                 StreamWriter w = new StreamWriter(@"C:\Temp\" + htmlFileName);//@"d:\rotterhtml\rotterscoops.html");                 w.Write(page);                 w.Close();                 extractlinks.Links(@"C:\Temp\" + htmlFileName);                 TextExtractor.ExtractText(@"C:\Temp\" + htmlFileName, newText);             }             else             {                 client.Encoding = System.Text.Encoding.GetEncoding(1255);                 page = client.DownloadString("http://rotter.net/scoopscache.html");                 TextExtractor.GetDateTimeList(page);                 StreamWriter w = new StreamWriter(@"d:\rotterhtml\rotterscoops.html");                 w.Write(page);                 w.Close();                 extractlinks.Links(@"d:\rotterhtml\rotterscoops.html");                 TextExtractor.ExtractText(@"d:\rotterhtml\rotterscoops.html", newText);             }         }   If the user calls the method I want him to have two options to call it with all 3 variables:  string htmlFileName, int offLineFileNumber, bool onlineOffline   Or to call it without the variables and if it's () so it will be automatic true.
I was watching , and it got me thinking about when optional parameters are available in C# what is going to be the recommended way to declare methods that do not need all parameters specified?  For example something like the FileStream class has about fifteen different constructors which can be divided into logical 'families' e.g. the ones below from a string, the ones from an IntPtr and the ones from a SafeFileHandle.  FileStream(string,FileMode); FileStream(string,FileMode,FileAccess); FileStream(string,FileMode,FileAccess,FileShare); FileStream(string,FileMode,FileAccess,FileShare,int); FileStream(string,FileMode,FileAccess,FileShare,int,bool);   It seems to me that this type of pattern could be simplified by having three constructors instead, and using optional parameters for the ones that can be defaulted, which would make the different families of constructors more distinct [note: I know this change will not be made in the BCL, I'm talking hypothetically for this type of situation].  What do you think? From C# 4.0 will it make more sense to make closely related groups of constructors and methods a single method with optional parameters, or is there a good reason to stick with the traditional many-overload mechanism?
Prove existence of a real root. My Mac Book Pro 13.-" doesn´t get past the grey booting screen with the apple and the spinning wheel (The loading bar appears but when it´s done nothing happens)   I have 220 GB in one single Partition (Macintosh HD) and there is all my work my music and the only copy of ALL MY PHOTOS. I´m so stupid I don´t have a backup of anything but know I have an external HD with 300GB space. I would like to repair my HDD but more important I need to save my files but I don´t know how to do it in Disk Utility Mode. I read there is a Diskwarrior but I don´t know how to install it without booting the mac. Please help!!!  When I start on Single User mode and enter /sbin/fsck -fs this appears  Executing fsck_hfs (version diskdev_cmds-557-393)  Checking Journaled HFS Plus volume.  The volume name is Macintosh HD  Checking extents overflow file.  Checking catalog file  Incorrect number of thread records  (4, 23745)  Checking multi-linked files.  Checking catalog hierarchy  Invalid volume directory count (It should be 175703 instead of 175701) Checking extended attributes file.  Incorrect number of extended attributes (It should be 340062 instead of 340064)  Checking volume bitmap.  Checking volume information.  The volume Macintosh HD could not be repaired after 3 attempts.  *****The volume was modified *****   What are the next steps if fsck fails to repair a drive? True Ubuntu on Chromebook ARM How will going from 75% Credit Utilization to 0% Credit Utilization affect my credit score? In the book Principles of Physics by Resnick Halliday: The decrease in Potential energy of a parallel plate capacitor due to a dielectric is because the slab would start to oscillate and the energy would transfer back and forth between the kinetic energy of the moving slab and potential energy stored in the electric field. First of, can somebody provide me the math of the SHM and could somebody explain why it would become the potential of the capacitor i.e. the electric field and not the potential of the slab? As the slab is doing SHM, shouldn't the slab(and not the capacitor) have potential energy at one point of time and kinetic at another like a spring? If the SHM is because of the electric field due to the conducting plates in capacitors, won't they always be in one direction (Plus, it's magnitude is not even a function of distance!)? Could someone be kind enough to provide the math and the reason for Potential and Kinetic Energy transfer question? Why am I seeing a bomb icon on my files and folders in Ubuntu? Primary Decomposition of $\mathbb{R^n}$ under T I have a question related to the Primary Decomposition Theorem for a vector space under a linear transformation.  The following question is a direct corollary of this theorem.  However, I wish to prove it without calling upon theorem.  I am currently studying for a comprehensive exam and ran across this question.  I never really felt comfortable with the proof I saw of the Primary Decomposition Theorem so I hoping with your help with this problem I will understand this particular problem and better understand that proof as I believe their proofs will be essentially the same techniques.   Question:  Suppose we have a linear transformation $T: \mathbb{R^n}\to \mathbb{R^n}$ with minimal polynomial $m(x)=f(x)g(x)$ and $f(x),g(x)$ are relatively prime.  Show that we can write $\mathbb{R^n}=M\oplus N$ where $M$ and $N$ are $T$-invariant subspaces s.t $f(x)$ is the minimal polynomial for $T|_M$ and $g(x)$ is the minimal polynomial for $T|_N$.   So I know that I want to use $M=ker(f(T))$ and $N=ker(g(T))$ but after that I really don't have much.  Since this isn't a homework problem for a class I am essentially looking for someone to present me a proof of this simpler question and walk me through their logic so that I can hopefully understand the general theorem and its proof.  Thanks in advance for the help! What does outputting to /dev/null accomplish in bash scripts? Is there a way to head/tail a document and get the reverse output; because you don't know how many lines there are in a document?  I.e. I just want to get everything but the first 2 lines of foo.txt to append to another document. "Most importantly" or "more importantly"? Which of the following two sentences is more correct?   "A picture says a thousand words, more importantly in a fraction of a second"    OR   "A picture says a thousand words, most importantly in a fraction of a second"   Nothing important, just my own quotes! Do also suggest, if I can put it in a better way to express what I want to. Determining the name of the VMware host of a VM guest - from the guest Is it possible to determine the name of the VMware host (ESX or ESXi) that my guest resides in, from within the guest itself?  I would expect this to be possible via VMware Tools, but am not sure where to look. How can I ensure my trip to the UK will not have to be cancelled because of Brexit? I've got a trip planned to the UK in June. Due to brexit, I'm worried what changes may be introduced before my arrival.  I'm traveling on a EU / Polish passport. I'm going for a couple weeks of holiday.  Is there anything I can do right now to make it less likely any changes won't stop me at the immigration? For example, applying for some tourist visa which does not rely on the EU status? How to add "Refresh" option to right click menu in Lubuntu? I have many users at the place I work, expressing the notion of switching to Ubuntu.  Most of them, for whatever weird reason wanting to know if its possible to have refresh added when you right click on the desktop.   Is that possible? I have the following annoying problem with Excel 2010. I use Conditional formatting to apply bold formatting to each line of the spreadsheet that meets a condition expressed by a formula. In the "applies to", I write =$A$2:$Q$149, which is the current extent of my spreadsheet. But I want this range to grow with my spreadsheet, i.e., I want the formatting to permanently apply to the whole spreadsheet. Regularly, my "applies to" field is transformed into a complex range, that selects most lines of spreadsheet, but not all, like =$A$2:$Q$138;$A$140:$Q$147. Have you ever encountered such a problem? Is there a solution? What's the difference between the apt packages: 'cinnamon' and 'cinnamon-desktop-environment'? I have a fresh Ubuntu install and want to install Cinnamon as the desktop environment. When I do apt search cinnamon, I get multiple results, but two seems like they are the correct one.   The first is just   cinnamon/xenial 2.8.6-1ubuntu1 amd64 all     Innovative and comfortable desktop (Common data files)   while the other is   cinnamon-desktop-environment/xenial,xenial 2.8.0 all     Cinnamon desktop environment - full desktop with extra components   What's the difference between the two? What does the cinnamon-desktop-environment package contain that the cinnamon doesn't? Problem with long chapter title and arsclassica Does time stretch all the way back for infinity or was there a point when time appears to start in the universe?  I remember reading long ago somewhere that according to one theory time began shortly before the creation of the universe.  Does time have a starting point of note? How to show $\lim_{x \to 1} \frac{x + x^2 + \dots + x^n - n}{x - 1} = \frac{n(n + 1)}{2}$? Rounding integers to nearest multiple of 10 Why do light disappears the moment we switch off the source (inside the wooden box)?