I have a problem with the retrieval of multiple checkbox values in my program. So as you can see below, I'm trying to retrieve from my database based on a set of values from the checkboxlist.  If I select ONE check box value, the database would be able to retrieve the item, however if I select MORE THAN ONE checkbox value, nothing will appear. Can someone help me please? I've spent quite some time on it.  I've seen other solutions but it doesn't seem to have helped me. Thank you.  protected void chkBoxCategories_SelectedIndexChanged(object sender, EventArgs e) {     // Create the list to store.     List&lt;String&gt; YrStrList = new List&lt;string&gt;();      // Loop through each item.     foreach (ListItem item in chkBoxCategories.Items)     {         if (item.Selected)         {             // If the item is selected, add the value to the list.             YrStrList.Add(item.Value);         }         else         {             // Item is not selected, do something else.         }     }      // Join the string together using the ; delimiter.     Session["UPCategories"] = String.Join(", ", YrStrList.ToArray()); }   The following code is on the other page:   SqlDataSource1.SelectCommand = "SELECT sf.*, sfc.* FROM SkillsFuture sf INNER JOIN SkillsFutureCategory sfc ON sfc.SFCatID = sf.fkSFCatID WHERE sfc.SFCatName IN (@catnames) AND sf.SFPrice BETWEEN @min AND @max AND sf.SFCertStatus='Verified'";  SqlDataSource1.SelectParameters.Add("catnames", Session["UPCategories"].ToString()); SqlDataSource1.SelectParameters.Add("min", Convert.ToDecimal(Session["UPBudgetMin"]).ToString()); SqlDataSource1.SelectParameters.Add("max", Convert.ToDecimal(Session["UPBudgetMax"]).ToString());  SqlDataSource1.DataBind();
How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.
Why are duplicates not being merged? I see more and more exact duplicates on SO. Instead of being merged they are being simply closed. I think this is very big disservice to SO. Why don't moderators merge duplicates? Why don't owners of the site do anything about this?  EDIT  It's disservice because this way we have more and more junk. Duplicates are duplicates and should be merged so that information in in one place.     If the duplicate has no answers then there is no benefit to merging.   Of course there is. You don't need to waste your time with dupes.     It also means that the search routes to the main question are   diminished which makes the posting of new duplicates more likely   There's easy solution for this which I gave in  back in march.     If both questions have answers that have been accepted, which one   should be unaccpeted?   There are plenty of solutions. You accept most voted accepted answer or the first accepted answer or both (I think this is be the best). Yes, there will be possibility of many accepted answers to one question. So what?     When a question is closed as a duplicate, there is a link to the   duplicate question. What more do you want?   I don't want yet another link. I want to have all answers to some problem in one place. Is this that hard? Isn't this natural expectaion?     Removal of the question means that the text in it is no longer searchable - that's a disservice.   See my answer above to Scrooge's comment. Prove the set of all infinite binary sequences is uncountable by using Cantor's theorem. This is different then the other versions of the questions here. I'm not supposed to use the diagonal argument. I'm looking to write a proof based on Cantor's theorem, and power sets. How would I implement a realistic stock market? Continuous function preserving rational difference. Find all the continuous functions $f:\mathbb{R}\rightarrow \mathbb{R}$ such that if $x-y\in \mathbb{Q}$ then $f(x)-f(y)\in \mathbb{Q}$.   Can somebody give me some hint to solve this problem. I think that the functions are $f(x)=mx+b$ where $m\in\mathbb{Q}$.  Thanks! How do you apply colormanagement settings to EXR files? How do you apply colormanagement settings to EXR files?  When i do some color adjustment by using colormanagement and try to save exr file and open it in photoshop it looks like colormanagement settings was not applied to it. What will be the trajectory of the given motion If it is given that component of acceleration perpendicular to the velocity of a body has a constant, non-zero magnitude, how can we mathematically prove that the trajectory of the body will be circular?   I have basic knowledge of calculus, vectors and co-ordinate geometry. I can prove that the trajectory of a body in projectile motion is parabolic. I tried to follow a similar method to get an equation of circle but couldn't succeed. I tried forming parametric equations of x and y in terms of time t (the way we proceed when proving the parabolic path of a projectile) but could not reach the conclusion.  Edit: I have edited the question in order to improve it. However I still can not share my work on this question as I had asked the question almost 6 months ago and now I can not find where I tried solving it. Sincerely sorry for that. Is there an implicit default constructor in C++? In the book I'm reading at the moment () it says that if you don't declare a default constructor for a class, the compiler supplies one for you, which "zeroes out each data member". I've experimented with this, and I'm not seeing any zeroing -out behaviour. I also can't find anything that mentions this on Google. Is this just an error or a quirk of a specific compiler? How to perform grouped ranking in MySQL So I have a table as follows:  ID_STUDENT | ID_CLASS | GRADE -----------------------------    1       |    1     |  90    1       |    2     |  80    2       |    1     |  99    3       |    1     |  80    4       |    1     |  70    5       |    2     |  78    6       |    2     |  90    6       |    3     |  50    7       |    3     |  90   I need to then group, sort and order them to give:  ID_STUDENT | ID_CLASS | GRADE | RANK ------------------------------------     2      |    1     |  99   |  1     1      |    1     |  90   |  2     3      |    1     |  80   |  3     4      |    1     |  70   |  4     6      |    2     |  90   |  1     1      |    2     |  80   |  2     5      |    2     |  78   |  3     7      |    3     |  90   |  1     6      |    3     |  50   |  2   Now I know that you can use a temp variable to rank, , but how do I do it for a grouped set?  Thanks for any insight! Documents with typical LaTeX errors I am giving a LaTeX course and have the idea to let the students find and solve problems within a few documents. Basically they shall learn how to create minimal examples and read error messages.  However, currently I have no document with 'typical' errors around.  If someone has such examples from him- or herself or within this forum I would like to have the code or link. It does not matter if its short or long. It should just be enough to let the students play with it for some minutes. Could I have a hint for testing the convergence of the following series please?  $$\sum_{n=2}^\infty\frac{1}{(\ln n)^{\ln n}}$$  I am very appreciative for your help. Toggle Switch to swap the connections of two buttons I am trying to mod my arcade stick so I can switch two commonly swapped buttons on the controller.  Essentially they are simple 2 terminal momentary switches connected directly to the controller PCB. I would like to switch their responsibilities, so in my case the Back button and the LB button on the XBox pcb I would like to swap so the Back actuates the LB button on the PCB and the LB actuates the Back button.  My assumption is that I would need a switch with 8 terminals, 4 in 4 out.  What type of switch am I looking for? What are complex numbers, actually? In , it is established that Thieves' Cant is more of an encoding system built on top of a language than a language in its own right. According to the Basic Rules,  is:  ...a secret mix of dialect, jargon and code allows you to hide messages in seemingly normal conversation. Only another creature that knows thieves' cant understands such messages. It takes four times longer to convey such a message than it does to speak the same idea plainly. In addition, you understand a set of secret signs and symbols used to convey short, simple messages, such as whether an area is dangerous or the territory of a thieves' guild, whether loot is nearby, or whether the people in an area are easy marks or will provide a safe house for thieves on the run. (PBR, p. 27)  Can two creatures communicate using Thieves' Cant if they do not have a basic spoken language in common, or if they are speaking different basic languages? E.g. if one creature knows Orcish, Goblin, and Thieves' Cant, and another creature knows Elvish, Giant, Common, and Thieves' Cant, can they communicate with each other by embedding Thieves' Cant into their own languages? Hypothetically speaking, I can see how this could be possible in our own world, if we assume that Thieves' Cant depends on nuances of body language, emphasis, and tempo, e.g., one might say to a non-Spanish speaker:  Tenemos quEEEEEEE ir (wink) a la tieeeeenda de (shuffle left foot) armas para (twirl hair and giggle) comprar una espada (wink twice) para mi herMANO (wag right pinky and nod).  The literal message itself (&quot;We need to go to the weapon store to buy a sword for my brother.&quot;) would just be a carrier - the real message might be hidden within the gestures and the accented and extended syllables. Perhaps the drawn-out &quot;E&quot; vowel means &quot;robbery planned&quot;, the wink means &quot;bank&quot;, shuffling the left foot means &quot;be there at sunset&quot;, etc., and these are things that you wouldn't necessarily need to know Spanish to extract. Is this how Thieves' Cant actually works, or does it require actual comprehension of the literal message transmitted before the &quot;secret&quot; message can be extracted from it? I'm trying to find  $$\lim_{n\to\infty}\frac{n}{\sqrt[n]{n!}} .$$   I tried couple of methods: Stolz, Squeeze, D'Alambert  Thanks!  Edit: I can't use Stirling. Is there a way to disable recovery mode so it won't be possible to factory reset your phone?  Basically what I am trying to do, is that it should be impossible to factory reset the phone as there is no recovery partition.  (Example format the recovery partition, or hide the option of factory reset on the recovery menu, build a custom recovery etc.)  P.S.. I was thinking of maybe removing a system app (example package installer) and making it a user app, and therefore when you factory reset the phone it won't start cause the system app is missing, but when I tried that, the phone wouldn't start even without resetting it, as the system needs the system app to start, ( I thought that maybe even though I removed the app from being a system app, the phone would still start as it's still there as a user app, and only after resetting the phone - that the user apps get deleted, the phone won't start as it's missing the app).  Thanks in advance How can I identify an anonymous inner class in a NotSerializableException My dconf/gsettings installation is broken. How can I fix it without Ubuntu reinstall? I run Ubuntu 12.04.1 LTS x64 in VirtualBox. After one very unfortunate misclick (reset saved state instead of load saved state) I got a very annoying problem.  Almost all applications (unity, synaptic, gedit, etc.) print on start:  Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.   And all GUI settings reset after reboot.   Another symptom:  $ GSETTINGS_BACKEND=dconf dconf-editor (dconf-editor:2353): GLib-GIO-WARNING **: Can't find module 'dconf' specified in GSETTINGS_BACKEND GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications   But /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so is present.     What I tried (and it didn't help):   sudo apt-get install -f --reinstall  dconf-tools libdconf0 libdconf-dbus-1-0 dconf-service Build dconf-0.5 from sources and make install it Create empty user profile and start programs there   I have to keep current Ubuntu installation so a complete reinstall is not an option for me.   How can I fix it? I'm just trying out Arduino Uno for the first time with 2 blinking LEDs on a breadboard. All the tutorials on the Internet seem to use a resistor. I do know the function of resistors, but does it really matter here? These LEDs are working just fine without a resistor. Rigorous proof that $dx dy=r\ dr\ d\theta$ I get the graphic explanation, i.e. that the area $dA$ of the sector's increment can be looked upon as a polar "rectangle" as $dr$ and $d\theta$ are infinitesimal, but how do you prove this rigorously?    1. Geometrically, the exact area would be $$\frac{(r+dr)^2d\theta}{2} - \frac{r^2d\theta}{2}$$$$= (r + \frac{dr}{2}) dr d\theta  $$$$= r dr d\theta + \frac{dr^2 d\theta}{2}.$$  How do we get rid of $\frac{dr^2 d\theta}{2}$? Is it too insignificant in value compared to $r dr d\theta$ so that it vanishes? If so, is it the reason it gets ignored? And what's more, geometrically speaking, why would the two areas - $dx dy$ and $r dr d\theta$, be equal?  2. Approaching it algebraically, setting $$x = r\sin\theta$$$$y = r \cos\theta$$  gives $$\frac{dx}{d\theta} = r\cos\theta,  dx = r\cos{\theta} d\theta$$$$ \frac{dy}{dr} = \cos\theta,  dy = \cos\theta dr. $$  Multiplying both equations, side by side, gives $$dxdy = r\cos^2\theta dr d\theta.$$  Again I get an extra term, which is $\cos^2 \theta$. In both cases I am unable to derive that $dxdy = rdrd\theta$.  What do I do wrong in my reasoning? It all makes me think that I'm getting something essential terribly wrong. Correlations between continuous and categorical (nominal) variables I would like to find the correlation between a continuous (dependent variable) and a categorical (nominal: gender, independent variable) variable. Continuous data is not normally distributed. Before, I had computed it using the Spearman's $\rho$. However, I have been told that it is not right.  While searching on the internet, I found that the boxplot can provide an idea about how much they are associated; however, I was looking for a quantified value such as Pearson's product moment coefficient or Spearman's $\rho$. Can you please help me on how to do this? Or, inform on which method would be appropriate?  Would Point Biserial Coefficient be the right option?