I want to write a class for creating Excel files from Datagridviews. I want to add a bottom line with Subtotals for selected columns and the number of those columns change from 1 to 3. I want my function work like this  exportToExcel(string title, DataGridView dgv, int colId1, int colId2, int colId3); //for with 3 sub total   //Example: exportToExcel("Some Title",mygridview, 3);  //for 1 sub total exportToExcel("Another Titme", othergridview, 5,6,7); //for 3 sub totals   Do I have to create functions for different variations or is there a way to make 2nd and 3rd column numbers optional ?
Note: This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).  We're building a web API that's programmatically generated from a C# class. The class has method GetFooBar(int a, int b) and the API has a method GetFooBar taking query params like &amp;a=foo &amp;b=bar.   The classes needs to support optional parameters, which isn't supported in C# the language. What's the best approach?
how to hide mesh but keep hair particles How do they decide Blu-ray/DVD release date? How do i convert a binary int into a string? What is a NullPointerException, and how do I fix it? SFDC DKIM Setup - Production or Sandbox? Cannot figure out this via SFDC documentation. Need someone who have setup this before to advise.  Basically we want to enable DKIM for our SFDC org. In testing Sandbox and production, the from email address is using the same email domain. For example, "test@abc.com" for sandbox and "contact@abc.com" in production.   Question: shall we setup DKIM in both sandbox and production or just need to setup in production since sandbox and production are actually using the same domain "abc.com"? I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM? Run PHPUnit Tests in Certain Order Is there a way to get the tests inside of a TestCase to run in a certain order? For example, I want to separate the life cycle of an object from creation to use to destruction but I need to make sure that the object is set up first before I run the other tests. Who paid for Harry's Nimbus 2000? The Nimbus 2000 was the fastest broom at the time of the Harry's first year at Hogwarts.  Professor McGonagall wanted to win the Quidditch Cup so she spoke with Dumbledore and got an exception from the rule that no first-years could have a broom for Harry.  My question is who paid for the broom?  It couldn't have been a cheap broom.  They wouldn't have taken gold out of Harry's Gringotts account without permission.  It wouldn't be right for the school to pay for it and I doubt McGonagall paid for it out of her own pocket.  So who paid for the broom? Given two coprime integers, find multiples of them that differ by 1 I'll describe the problem with an example.  Find integers $n$ and $m$ such that $n\cdot13 + m\cdot101 = 1$. This is the same as solving the equation $n\cdot13 \equiv 1 \pmod {101}$  I'm revising for a maths exam in a few days and it seems like a lot of the questions and examples rely on an ability to solve this type of problem. I can't seem to find a method in my notes, the solutions just get plucked out of thin air! What is a neat way of doing it on pen and paper with a calculator? Can anyone recommend a good exposition of the theory behind partial least squares regression (available online) for someone who understands SVD and PCA?  I have looked at many sources online and have not found anything that had the right combination of rigor and accessibility.    I have looked into The Elements of Statistical Learning, which was suggested in a comment on a question asked on Cross Validated, , but I don't think that this reference does the topic justice (it's too brief to do so, and doesn't provide much theory on the subject).  From what I've read, PLS exploits linear combinations of the predictor variables, $z_i=X \varphi_i$ that maximize the covariance $ y^Tz_i $ subject to the constraints $\|\varphi_i\|=1$ and $z_i^Tz_j=0$ if $i \neq j$, where the $\varphi_i$ are chosen iteratively, in the order in which they maximize the covariance.  But even after all I've read, I'm still uncertain whether that is true, and if so, how the method is executed. Subject/verb agreement when a title ends in a plural 1) "The book 'The Three Musketeers' is a wonderful example of..." Here we have a proper noun, a title that happens to end in a plural, and I have no sense that the verb should be plural. "Musketeers"/is seems proper/natural/correct, and 'are' not at all.   However, such certainty begins to wane in other examples: 2) "'The Heidi Chronicles' is a wonderful example of..." doesn't completely shake my confidence, but it moves the needle, at least a little bit. But, practically speaking, I wouldn't have a second thought about correcting a student who used 'are' instead of 'is'.  Here's the one that really bothers me: 3a) " 'The Basement Tapes' are a wonderful example of..." I don't think this sounds any less proper/natural/correct than 3b) " 'The Basement Tapes' is..." In fact, 3a seems less awkward than 3b.  Why? Allow [tag:tag-name] syntax to link to any site The tag  and meta-tag  syntax generate much nicer looking results than merely surrounding your tag with [square brackets].    However, they only work when you're talking about the site you're on.  On Area51, in Chat, and on Meta sites, this is frequently not the case, leading to attempts at syntax like [[tag:failure]](https://superuser.com/questions/tagged/failure), which produces:    Hmm, must be some subtle syntax thing:   : [tag:failure](https://superuser.com/questions/tagged/failure) []: [[tag:failure](https://superuser.com/questions/tagged/failure)] : [tag:[failure]((https://superuser.com/questions/tagged/failure))] : &lt;a href="https://superuser.com/questions/tagged/failure"&gt;[tag:failure]&lt;/a&gt; : [tag:failure][1] \n\n [1]: https://superuser.com/questions/tagged/failure : [more text is a [tag:failure] too](https://superuser.com/questions/tagged/failure)   I give up!  How can I create a link to a tag on another site with tag markdown? How do I boot into single-user mode from GRUB? How can I make calls related to a case display in its Chatter feed? I am using the Service Console in Lightning Experience, and using the Chatter Feed component on the Case layout to display updates to the Case.  If I use the "Log a Call" Quick Action from the Chatter publisher, these calls are displayed in the Chatter feed.  This is the desired behaviour.  However, if I insert a Log a Call record related to the Case any other way - e.g. using the Developer Console, or my CTI system's custom components - the call does not display in the feed.  If I query the record, it looks exactly the same as the record that is created with the Quick Action.  It just seems that the Chatter post is never made in this situation.  I have checked my Feed Tracking settings:   Task has Enable Feed Tracking and Subject checked Case has All Related Objects checked   How can I enable calls created with a custom component (part of a CTI system) to display in the case feed? $\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) &gt; 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer? How to activate bluetooth device for RTL8723DE? The wireless drivers for the RTL8723DE appeared for downloading and the module is now usable for Wi-Fi.   See   But the bluetooth part of it is yet not supported on Ubuntu. How this can be fixed?  lsusb shows  Bus 001 Device 003: ID 0bda:b009 Realtek Semiconductor Corp.    And usb-devices | awk '/0bda/' RS=  T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#=  3 Spd=12  MxCh= 0 D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1 P:  Vendor=0bda ProdID=b009 Rev=02.00 S:  Manufacturer=Realtek S:  Product=802.11n WLAN Adapter S:  SerialNumber=00e04c000001 C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I heard the following dialog in a British English movie:     Words go round quick. All the little tongues go clack, clack, clack.   What does this mean, and why was the word "quick" used instead of "quickly"? Long wait time on login Why didn't the Order of the Phoenix assist with the trio (i.e.  Harry Potter, Ron Weasley and Hermione Granger) in the Horcrux hunt? I write some choice questions into beamer frame, after some research, here is my code:  \documentclass[aspectratio=169]{beamer} \usetheme{Berkeley} \usepackage{tasks,CJK} \begin{document} \begin{CJK*}{utf8}{bsmi} \begin{frame} \transwipe 1.Which one you want to choose? \begin{tasks}[counter-format=tsk[A].,debug=true](4) \task A \task B \task C \task D \end{tasks} \end{frame} \end{CJK*} \end{document}   output with pdflatex:  But I don't want the D choice goto the second line, I want them stay in one line, what should I do?