I am using the sql query like  SELECT fun_systemuser(UserID) as ConsultantName,        fun_store(UserID) as StoreName,        count(UserID) as No_of_PhoneModel,        PhoneModelID,        (select LeegraRegion            from store           where ID=claim.StoreID) as Region,        fun_network(UserID) as ChannelName,        fun_group(claim.StoreID) as GroupName,        fun_campaigns(UserID) as CampaignName     FROM `claim`   where UserID IN (SELECT id                      FROM `systemuser`                     WHERE `RoleID`=1                       and `Topconsultant`=1)     and StatusID=5   group by UserID ,PhoneModelID   I have query result like given below:    There are 4 records for single consultant with different phone model id and no. of sales of phone model id.  I want to single record for every consultant name and there should be show phone model and no.of phone model with comma separated value.  Ex. single record should display like below  Thomson 4U-Sunnypark 3,2,3,1  1,3,6,9 Pretoria Vodacom Sachar Mobile vodacom Campaigns   Is anybody know what should I use in query so I can get the result as I want. Thanks in advance.
Using MySQL, I can do something like:  SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;   My Output:  shopping fishing coding   but instead I just want 1 row, 1 col:  Expected Output:  shopping, fishing, coding   The reason is that I'm selecting multiple values from multiple tables, and after all the joins I've got a lot more rows than I'd like.  I've looked for a function on  and it doesn't look like the CONCAT or CONCAT_WS functions accept result sets.  So does anyone here know how to do this?
I need rules to drop some malicious Apache connections I drop all traffic on ports except on 80 for my web server.  I have some rules like this on iptables:  iptables -A INPUT -p tcp -m tcp --dport 80 -m string --string "cgi" --algo bm --to 1000 -j DROP   Someone who have more can share? I know always the bad hackers still updating, but some of them always begin with the same code. I need to Drop the connection based on some criteria. Here are some Apache log (I remove ips but each atack come from the same):  Attack 1: This I don't know what are trying to do, but make it 50 times from the same ip  GET / HTTP/1.1  301 224 -   Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22 GET / HTTP/1.1  302 3387    -   Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22   Attack 2: this try to get information about server only.  GET / HTTP/1.1  301 224 http://myip:80/ Go-http-client/1.1 GET / HTTP/1.1  302 3228    http mywebsite  Go-http-client/1.1 GET /es/ HTTP/1.1   200 40947   https mywebsite Go-http-client/1.1   Attack 3: they try get access to a login page vulnerability  GET /userlogin/login.aspx HTTP/1.1  302 186 -   -   Attack 4: this try to access a cgi at first request, (see my first iptables rule to drop this)  GET /hndUnblock.cgi HTTP/1.0    302 186 -   Wget(linux) GET /tmUnblock.cgi HTTP/1.0 302 186 -   Wget(linux)   I'm very new with server this 4 attacks are from only last 12 hours... Have thousands per week. Prove that there exists some $c\in(-3,3)$ such that$ \ \ g(c) \cdot g''(c)<0$. $f(x)$ is a differentiable function and $g(x)$ is a double differentiable function such that $|f(x)|\leqslant 1$ and $f'(x)=g(x)$. If $$f(0)^2+g(0)^2=9$$ then prove that there exists some $c\in(-3,3)$ such that$ \ \ g(c) \cdot g''(c)&lt;0$.  Attempt: Let us define a function $h(x) = g(x) g~'(x)$. Then $$h'(x) =  g(x)g''(x) + \left( g'(x) \right)^2 \tag 1$$ If we prove that for some $c \in (-3,3), h~'(c) &lt; 0,$ then $$g(c)g''(c) &lt;0 \tag 2$$ Also, $$\left|f(0)\right| &lt; 1 \implies f'(0) \in (-3,-2\sqrt 2 ) \cup (2\sqrt 2,3) $$ Could someone please advise me how do I move forward from here. Thank you very much for your help in this regard. Computing second partial derivative with polar coordinates Consider the polar coordinates with $x=r\cos\theta$ and $y=r\sin\theta$.  I can show using the chain rule that $$\frac{\partial}{\partial x} = \frac{x}{r} \frac{\partial}{\partial r} -\frac{y}{r^2} \frac{\partial}{\partial \theta}$$   What is the method to compute $\dfrac{\partial^2}{\partial x^2}$? I don't know how to do it. $3^{n+1}$ divides $2^{3^n}+1$ Describe all positive integers,n such that $3^{n+1}$divides $2^{3^n}+1$. I am little confused about what the question asks-if it asks me to find all such positive integers, or if it asks me to prove that for every positive integer n,$3^{n+1}$ divides $2^{3^n}+1$. Kindly clarify this doubt and if it's the former part, please verify my solution-n=1. Allow moderators to edit/delete comments directly from the per-user comment moderation page A while back, a new dashboard was added to the user moderation tools to .  It's great for scouring a user's comment history to find certain comments, but I can't do anything from this dashboard except filter by flagged1, deleted, or active comments, and visit the posts to which the comments are attached where I can then edit or delete them.  Can we have the ability to edit and delete comments from this dashboard just as we're able to from the flag queue? It gets particularly tedious to have to open 100 tabs just to delete 100 spam comments from the posts they're attached to (and no, I'm not making that number up2...).    1 .  2 Alright, fine, I made that up; the actual number of spam comments I had to delete was 111. How does time work in The Matrix? How to make a meta box field a requirement I've been Googling around with no luck.  I'm looking for a way to do getc() or gets() or whatever that does not echo to the terminal.  I saw kbhit() but this doesn't appear to be part of ANSI.  Ideally, I'd like code that looks like  char s[100]; no_echo_gets(s); /* Won't echo to screen while being typed */ printf("%s\n", s);   Does anybody know a good ANSI compliant way to do this? It's supposed to be zero but for some reason the result produces a peculiar series of digits at the end.  Also, here's the .xlsx of it: http://83.212.111.36/Book1.xlsx Convert generic List/Enumerable to DataTable? I have few methods that returns different Generic Lists.   Exists in .net any class static method or whatever to convert any list into a datatable? The only thing that i can imagine is use Reflection to do this.  IF i have this:  List&lt;Whatever&gt; whatever = new List&lt;Whatever&gt;();   (This next code doesn't work of course, but i would like to have the possibility of:  DataTable dt = (DataTable) whatever; "Holmby hall" or "The Holmby Hall", does the hall have to be capital in either of them? Some things are easier to implement just by hand (code), but some are easier through WF. It looks like WF can be used to create (almost) any kind of algorithm. So (theoretically) I can do all my logic in WF, but it's probably a bad idea to do it for all projects.  In what situations is it a good idea to use WF and when will it make things harder then they have to be? What are pros and cons/cost of WF vs. coding by hand? Why does Java have an "unreachable statement" compiler error? Steps to solve this system of equations: $\sqrt{x}+y=7$, $\sqrt{y}+x=11$ Select translation: where? Is there a way to find out if I need a transit visa for a layover in the UK? Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have. Usage of "as if" as interjection My question concerns the usage of "as if" as an idiomatic interjection. The references I have consulted (etymonline, online dictionaries, etc.) seem to agree that "as if" is used in this context to convey incredulity or doubt. This is how I have always thought of it.  The other day, I was with friends who used "as if" to express their surprise and joy about a wedding proposal. They weren't being sarcastic or incredulous; they were genuinely happy about the proposal. Here is a loosely paraphrased version of what they said:  "As if they're getting married!"  Is my friends' usage of "as if" standard? Is it a primarily regional distinction? (I am in Ontario, Canada right now.) The closest example we could come up with is someone says "I can't believe that you won first prize!" Of course, the person can and does believe it, so their words ought not to be taken literally. Is it the same idea with "as if"? Should spam posts be edited? Is starting a group with 5 newbies (DM included) possible? Some friends and I want to start playing D&amp;D (5e), but none of us, DM included (not me) have played before to any great extent. The DM and I have some cursory experience with 4e, but have never been able to play to any great extent. Is this advisable, or should we play with existing groups first? We live in a relatively remote area, making it hard to find experienced players. Sometimes when reading through user comments on a particular answer, some usernames that appear like user[digit] e.g user12345 are not links. Is this a known behaviour or any other thing I am not aware of?