I have a table that has columns like following. Batch number is a database design thing like row number  dm_id        type_in_id    type_student_id     amount  36              1               1               1  36              1               2               2  36              1               3               3  36              2               1               4  36              2               2               5  36              2               3               6  36              3               1               7  36              3               2               8  36              3               3               9   I want to create a query that would return this:  dm_id  amount1 amount2 amount3 amount4 amount5 amount6 amount7 amount8 amount9  36       1       2       3       4       5       6       7       8       9   How can I do that?  P.S. Version 5.5.56-MariaDB - MariaDB Server
Been looking to pivot rows (progress_check) into columns check 1, check 2 etc... No sum or totals required, just to display the results hopefully... Can anyone help, Thanks Ad
I recently came across an algorithm that works on values assuming that they are draw from a monoid equipped with a total ordering relation.  I was wondering if there is a term for such a structure, since it seems related to concepts like Euclidean domains and fields (though the requirements are much less strict).  Does this entity have a name?  Or is it just "a monoid over totally ordered elements?"  Thanks! Why are there directories called Local, LocalLow, and Roaming under \Users\\AppData? I have a workstation running Windows Server 2008 that's logged into an  domain, and I have a dual boot with Ubuntu Linux. When running Linux, I'd like to be able to use the same Thunderbird profile I use under Windows, so I pointed Thunderbird to use a profile I found under:  \Users\(myname)\AppData\Local\Thunderbird\Profiles   It turns out it was not the correct profile -- it had the right configuration, but the Inbox was an old version. I eventually found out the correct path was:  \Users\(myname)\AppData\Roaming\Thunderbird\Profiles   What's the rationale behind those different places to store application data? How to easily and completely disable/enable WLAN (so it cannot be turned on again while travelling)? Without going into specifics of why I might like to do this, or whether this is a good idea or not, I would like to know how I can disable use of wireless networking on my MacBook Air, either via removal of software or drivers or similar, such that the machine is unable to connect to a WIFI network in any way without I undo those changes.  The intention is for the machine to be unable to communicate wirelessly when out of the house, and for those changes to not be easily reverted until I return (for example requiring some piece of external storage that does not travel with me and which contains copies of whatever I have removed). How can I easily remove and then re-allow WIFI access (without losing my stored profiles/passwords or disturbing anything else)? Is it possible to simply copy a certain app or plugin to an external drive, delete it from my laptop, and later copy it back, again having everything as it was before?  One year later I have been happily using Daniel Lawson's solution below for quite some time now. I have created two applications with automator, one that deletes the .kext, one that restores it from an USB stick. First, copy /System/Library/Extensions/IO80211Family.kext to a USB stick and leave that stick at home. Open Automator, select to create an &quot;Application&quot;, then choose &quot;Utilities&quot; from the &quot;Library&quot;, then &quot;Execute Shell Script&quot;. (I'm translating this from my German menus, so the exact names may differ.) For the &quot;Disconnector&quot; app, enter the following into the text area of the &quot;Execute Shell Script&quot; event: echo YOUR_ADMIN_PASSWORD | sudo -S rm -rf /System/Library/Extensions/IO80211Family.kext  Replace &quot;YOUR_ADMIN_PASSWORD&quot; by your admin password. Then save the app and drag its icon to the Dock. Now, when you are sure you want to be free of all online distractions, click the app icon, and the IO80211Family.kext is gone. Just restart your laptop and you can no longer connect to WLAN:  For the &quot;Reconnector&quot; app, enter the following into the text area in Automator: echo YOUR_ADMIN_PASSWORD | sudo -S cp -r /Volumes/NAME_OF_YOUR_USB_STICK/IO80211Family.kext /System/Library/Extensions/  Replace &quot;YOUR_ADMIN_PASSWORD&quot; by your admin password and &quot;NAME_OF_YOUR_USB_STICK&quot; by the name of your USB stick. Save the app etc. Now when you return home, insert the USB stick that carries the IO80211Family.kext into your laptop, click the Reconnector app icon and then restart your laptop. Now you can connect to WLAN again. Note. There are some security issues invovled when you echo your admin password, because by that it is written to the shell history and can be found there. I don't care, but you might, depending on your circumstances. To better describe the above problem, whenever I start up my Ubuntu/Windows 10 Machine and select Ubuntu, whenever the machine tries to start the GNOME Desktop Environment, it says it started it successfully. however, I never get a graphical desktop environment to use. I can fix this by logging into tty3 and typing gnome-session but I don't really want to do that as, for some reason, that skips login. Can anyone help? swap x and y axis on data generated plot How long can eggs be unrefrigerated before becoming unsafe to eat? A friend of mine accidentally left a carton of eggs on her counter, unrefrigerated, for three days. The eggs had been previously refrigerated both at the store and at home. Now she's planning to do some more cooking which requires eggs, and is wondering if it's still safe to use them for baking. I believe she is planning on baking cookies with them, so they would be baked at fairly high temperatures for probably at least 10 minutes. Would this be safe, or are eggs left unrefrigerated for that long not safe for consumption? List of all "partitions"/ "cuttings" of a list What is the problem that gets worse after you try to solve it? Bash/Korn shell script edited on Windows throws error '...^M: not found' I have a Python function that takes a numeric argument that must be an integer in order for it behave correctly. What is the preferred way of verifying this in Python?  My first reaction is to do something like this:  def isInteger(n):     return int(n) == n   But I can't help thinking that this is 1) expensive 2) ugly and 3) subject to the tender mercies of machine epsilon.   Does Python provide any native means of type checking variables? Or is this considered to be a violation of the language's dynamically typed design?  EDIT: since a number of people have asked - the application in question works with IPv4 prefixes, sourcing data from flat text files. If any input is parsed into a float, that record should be viewed as malformed and ignored. I'm considering taking a loan on my 401k in order to pay off and close 2 credit cards.  I have approximately 30 years until I consider retiring.  The amount of the loan will be $1700 which is less then 20% of my current 401k balance.  I will continue to put 9% of my paycheck into a Roth 401k, and my employer matches 9%.  The loan will be paid back at 3.25% (to myself) and does have $183 in fees.  There are 2 cards I will pay off and close if I follow through with this plan.  One card is 17.9% interest with roughly a $650 balance.  The other is 23% (ish) with roughly a $1,025 balance.  Both of these cards do have an annual fee associated with them, I used them to rebuild my credit and have a newer, lower interest, no fee card that I will keep active for emergencies.  Would it be advantageous for me to pay off these two credit cards and cancel them with a 401k loan? What kinds of compensation can I get from Deutsche Bahn for canceled and late trains? Is it possible to print to the Report window in the Info view? I'm a computer student, learning math just for fun. Today I was  that I found something strange! I noticed that that wired function ${x^{x^{\cdot^{\cdot^{x}}}}}$ in zero, seems to converge to 1 when there are even powers and to 0 when there are odd powers! Then I attempt to prove it but I failed.  Then I did a little research and I found the  article on Wikipedia. This article says that my guess was right but without any proof. So I'm here to ask you about it.     If we define ${x^{x^{\cdot^{\cdot^{x}}}}}$ as ${^{n}x} :=\begin{cases} 1 &amp;\text{if }n=0 \\ x^{\left(^{(n-1)}x\right)} &amp;\text{if }n&gt;0 \end{cases}$      then prove:      $$\lim_{x\rightarrow0} {}^{n}x = \begin{cases}   1, &amp; n \text{ even} \\  0, &amp; n \text{ odd} \end{cases}$$ Both static_cast and reinterpret_cast seem to work fine for casting void* to another pointer type. Is there a good reason to favor one over the other? How to distinguish Nexus 7 (2012) and Nexus 7 (2013) I am having trouble with Bluetooth Low Energy (BT 4.0) on a Nexus 7.  I think I may have a 2012 model.  How to tell if I have a 2012 or 2013 version of the Nexus 7? Suppose $f$ and $g$ are continuously differentiable functions such that $f(x) = g'(x)$ and $g(x) = f'(x)$ and that any product of $f, f', g$ and $g'$ is commutative for all $x ∈ R$. Show that $ f^2 − g^2 = C $ for some real constant C  I have actually no clue how to solve this, and would be really greatfull for all the help i can get Determine the Galois group of $\mathbb{Q}(\sqrt{a+b\sqrt{d}})$ Suppose $L=\mathbb{Q}(\sqrt{a+b\sqrt{d}})$,($d$ and $a+b\sqrt{d}$ are square free algebraic integers) when is $L/\mathbb{Q}$ a normal extension? When does $Aut(L/\mathbb{Q})=\mathbb{Z}/4\mathbb{Z}$ or $Aut(L/\mathbb{Q})=\mathbb{Z}/2\mathbb{Z}\times \mathbb{Z}/2\mathbb{Z}$? Please don't throw this one out as a duplicate of  I'm not asking about the plurality of the noun immediately following those two words - I'm interested in exactly why the example below is problematic (context: I have several children, one named John)...     1: One of my children's name is John.   I can't see any obvious reason why singular name there is completely unacceptable, but it certainly doesn't sit well with me. It seems to turn on whether one of my children can be treated collectively as the "subject" of the Saxon genitive 's, but I don't see a problem with...     2: It's actually one of my children's, but you can sleep in this bed.   I realise that in practice we'd normally pluralise names in the first example. But of course, this implies that one of attaches to my children's names, which isn't really the same construction.  So - is there some kind of "rule, principle" debarring #1 above? Or is it just "one of those things"?    (Apologies if my later switch from brothers to children invalidates any comments or answers.) Without using any non-standard (Windows included) utilities, is it possible to download using the Windows command line?  The preferred version is Windows XP, but it's also interesting to know for newer versions.  To further clarify my question:   It has to be using HTTP The file needs to be saved Standard clean Windows install, no extra tools   So basically, since everybody is screaming , I want simple Wget functionality, without using Wget.