I have this table in my db  id | major | code_lesson | files   Which the contents look like this  id | major | code_lesson | files 1  | Math  | MAT12       | mat.pdf 2  | Socio | SOC15       | soc.pdf 3  | Math  | MAT12       | mat_pre.pdf 4  | Physic| PHY19       | physci.pdf 5  | Physic| PHY19       | phy2.pdf   I want to display this table like this  major |file1       |file2 Math  |mat.pdf     |math_pre.pdf Socio |soc.pdf     | Physic|physci.pdf  |phy2.pdf   Can you please explain me how to achieve this, since my output result  1 rows :  select major, files as file1, (select files where max(id)) as file2 from db_school   Thanks in advance
I have a table that looks like this:  +----------------------------------------+ |Name                | kode      | jum   | +----------------------------------------+ | aman               |kode1      | 2     | | aman               |kode2      | 1     | | jhon               |kode1      | 4     | | amir               |kode2      | 4     | +--------------------+-----------+-------+   How can I make a view like this with MySQL?                      kode1    kode2     count aman                  2         1        3   jhon                  0         4        4 amir                  0         4        4
Changing default width of blocks in beamer I use a custom Beamer theme for my presentations. In my presentations I'd like to use blocks (\begin{block}…\end{block}). These blocks are rendered slightly too wide to fit into my theme. Is there a way how I can set the default width of blocks, e.g. to .9\textwidth? Show $\inf_f\int_0^1|f'(x)-f(x)|dx=1/e$ for continuously differentiable functions with $f(0)=0$, $f(1)=1$. How to prevent accidental clicks in the Save button when saving a node? I need to prevent accidental clicks in the Save button when a node is being saved.  I found this   which does exactly this. But the problem is that it uses javascript (jquery). Then if the user disable javascript this module is useless.  My problem is that in my website the user get points when creating nodes, so I have to prevent this in a more secure way.  How can I do this?   What do you think of these ideas?:  1) Maybe I would forbid the node being saved more than one time    programmatically instead of disabling the Save button.   2) Or better: I would allow the user to just save a new node every 5 minutes. Resizing an Image without losing any quality Get Age of a person in MySQL What is the difference between using a colon and a semi-colon to join two sentences? I've seen a few questions on this site relating to semi-colons, which I believe I correctly understand, but what I'm not as clear about is colons.  For example:     The man ate the apple; it tasted good.   Is this not correctly also written as:     The man ate the apple: it tasted good.   In this case, what is the difference between the two sentences? Was voldemort's body going to die? Voldemort has gained "immortality" via his horcruxes, but was his body immortal to age? Looking at all the questions about Voldemort and his horcruxes what was his plan to keep his body alive. We know his first Horcux was created at age 16, yet we see him age still so it seems like eventually his body would die of old age and his soul would be left in the half dead state he was in after his spell rebounded off Harry. What was his plan here, why would he not want something such as the elixir of life to keep his vitality?     While the Elixir of Life does indeed extend life, it must be drunk regularly, for all eternity, if the drinker is to maintain his immortality. Therefore, Voldemort would be entirely dependent on the Elixir, and if it ran out, or was contaminated, or if the Stone was stolen, he would die just like any other man. Thereafter, I am convinced, he intended to continue to rely on his Horcruxes: he would need nothing more, if only he could regain a human form. He was already immortal, you see ... or as close to immortal as any man can be.' (Albus Dumbledore)   Horcruxes seem to fail at something important, keeping you alive, they stop you from dying truly yes, but they don't keep you alive. Harry is shown over and over again to be able to beat better wizards because hes has faster reflexes both because of youth and his genetics, but presumably by 50 harry will not be as fast as his 16 year old self even considering their longer life expectancy. Why operate in a body of a 50 year old? Using package nomencl ssh to private-ip I have a computer with CentOS (computer A) that configured as has an private ip 10.150.5.141 (with restricted firewall), can access internet and my ArchLinux VPS (computer B) with real ip w.x.y.z  How can I make another pc (computer C) that could access computer B to connect to computer A, but computer C cannot connect to computer A directly (because it's on A's own private network)?  I know that a tunnel can open local ports to another computer:port, but how to do the opposite?  I want to access computer A using ssh through computer B but computer B cannot access computer A, because the network on computer A is restrictive (can go out, but can't go in, because I have no access to their router)  I want something like this:  ssh -connect-to w.x.y.z:22 -open-port vvv -forward-to 10.150.5.141 -port 22   so that when I ssh w.x.y.z:vvv from computer C it will forwarded to private network 10.150.5.141:22. iSight cable for mid 2009 macbook pro 13" help If my iSight camera no longer works and neither does my bluetooth, should my wifi still technically be working? Aren't they all co-dependent(if that makes sense) or can the fact that my wifi is still functional mean that the iSight camera still works and it's a software problem. Why won't my taskbar display on my secondary monitor? On my secondary monitor (currently using Windows 10), my taskbar will barely show up. I've tried adjusting the resolution to lower ones (it recommends 1920x1080) and it doesn't do much. Is there a way to adjust the taskbar so I can see it?  That is about what I see. I could make it bigger via Snipping Tool and see my entire desktop on the picture but not normally. List of interesting math videos / documentaries This is an offshoot of the question on . I have listed a few videos/documentaries I have seen. I would appreciate if people could add on to this list.  $1.$ Story of maths      $2.$ Dangerous Knowledge    $3.$   $4.$   $5.$ python get only class attribute no superclasses How to detect existence of a class using SFINAE? "thanks for flagging" popup gets messed up when the comment is automatically deleted For some comments, the comment is automatically deleted when you raise a flag. This includes certain keywords and short +1 comments. But when you raise that flag with the new comment flag interface, the "thanks for flagging" shows up in the top right when the comment is deleted:      As opposed to what happens when you raise a flag on a comment that doesn't auto-delete: app crash in the dealloc What does it mean for two objects to "touch"? If you've ever been annoyingly poked by a geek, you might be familiar with the semi-nerdy obnoxious response of      "I'm not actually touching you! The electrons in the atoms of my   skin are just getting really close to yours!"   Expanding on this a little bit, it seems the obnoxious geek is right. After all, consider Zeno's paradox. Every time you try to touch two objects together, you have to get them halfway there, then quarter-way, etc. In other words, there's always a infinitesimal distance in between the two objects.   Atoms don't "touch" each other; even the protons and neutrons in the nucleus of an atom aren't "touching" each other.  So what does it mean for two objects to touch each other?   Are atoms that join to form a molecule "touching"? I suppose the atoms are touching, because their is some overlap, but the subatomic particles are just whizzing around avoiding each other. If this is the case, should "touching" just be defined relative to some context? I.e, if I touch your hand, our hands are touching, but unless you pick up some of my DNA, the molecules in our hands aren't touching? And since the molecules aren't changing, the atoms aren't touching either?  Is there really no such thing as "touching"? I updated to Ubuntu 20.04. When I use the default terminal, everything is fine. But if try to use terminator, I cannot use sudo. I get permission denied. Again, only when using terminator.  How can I sudo from the terminator? I really would like to continue to use a terminator.  Edit: I just also noted that it cannot find make either. I guess it's all messed up. I'll try to uninstall it and install again I guess. What is the Coandă effect? How is it defined, and what causes it? Can anybody explain to me the  well? I am finding that many definitions and explanations conflict.  I am particularly confused about the following points regarding the Coandă effect:   whether the Coandă effect is the same as normal boundary layer attachment to a surface whether the Coandă effect is only defined for convex surfaces over which a jet (of the same state as the surrounding fluid) is tangentially blown what causes the Coandă effect: the jet entraining the ambient fluid or a balance of pressure and centrifugal forces, or something else? When thinking about travelling, I often have to think about a place to visit, and then look up visa rules for that particular country. This can be a fairly painful process because official government sites can often be hard to find, and advice on (say) guidebooks or Wikitravel tends to be generic.  Is there any resource where I can enter my nationality/residency, and then look up a list of visa rules for various countries?