i am using my sql data base i have table with following data and table name is account  id       name      parent-id  1       aaa          null  2       bbb          1  3       ccc          2  4       ddd          1  5       eee          3   i would like to display as follows    names    aaa      bbb         ccc            eee      ddd   can any one help me i have tried a lot but i doesn't get exact requirement please help me
SUB-TREE WITHIN A TREE in MySQL  In my MYSQL Database COMPANY, I have a Table: Employee with recursive association, an employee can be boss of other employee. A self relationship of kind (SuperVisor (1)- SuperVisee (∞) ).     Query to Create Table:    CREATE TABLE IF NOT EXISTS `Employee` (   `SSN` varchar(64) NOT NULL,   `Name` varchar(64) DEFAULT NULL,   `Designation` varchar(128) NOT NULL,   `MSSN` varchar(64) NOT NULL,    PRIMARY KEY (`SSN`),   CONSTRAINT `FK_Manager_Employee`                 FOREIGN KEY (`MSSN`) REFERENCES Employee(SSN) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;   I have inserted a set of tuples (Query):    INSERT INTO Employee VALUES   ("1", "A", "OWNER",  "1"),     ("2", "B", "BOSS",   "1"), # Employees under OWNER   ("3", "F", "BOSS",   "1"),   ("4", "C", "BOSS",   "2"), # Employees under B  ("5", "H", "BOSS",   "2"),   ("6", "L", "WORKER", "2"),   ("7", "I", "BOSS",   "2"),   # Remaining Leaf nodes     ("8", "K", "WORKER", "3"), # Employee under F        ("9", "J", "WORKER", "7"), # Employee under I        ("10","G", "WORKER", "5"), # Employee under H   ("11","D", "WORKER", "4"), # Employee under C  ("12","E", "WORKER", "4")     The inserted rows has following Tree-Hierarchical-Relationship:                A     &lt;---ROOT-OWNER         /|\                     / A \               B     F      //| \    \              // |  \    K        / | |   \                       I  L H    C         /     |   / \  J     G  D   E   I written a query to find relationship:    SELECT  SUPERVISOR.name AS SuperVisor,          GROUP_CONCAT(SUPERVISEE.name  ORDER BY SUPERVISEE.name ) AS SuperVisee,          COUNT(*)   FROM Employee AS SUPERVISOR    INNER JOIN Employee SUPERVISEE ON  SUPERVISOR.SSN = SUPERVISEE.MSSN  GROUP BY SuperVisor;   And output is:    +------------+------------+----------+ | SuperVisor | SuperVisee | COUNT(*) | +------------+------------+----------+ | A          | A,B,F      |        3 | | B          | C,H,I,L    |        4 | | C          | D,E        |        2 | | F          | K          |        1 | | H          | G          |        1 | | I          | J          |        1 | +------------+------------+----------+ 6 rows in set (0.00 sec)   [QUESTION] Instead of complete Hierarchical Tree, I need a SUB-TREE from a point (selective) e.g.: If input argument is B then output should be as below...  +------------+------------+----------+ | SuperVisor | SuperVisee | COUNT(*) | +------------+------------+----------+ | B          | C,H,I,L    |        4 | | C          | D,E        |        2 | | H          | G          |        1 | | I          | J          |        1 | +------------+------------+----------+      Please help me on this. If not query, a stored-procedure can be helpful. I tried, but all efforts were useless!
Make the MSE favicon grayscale (like all other meta icons are) The new  for Meta Stack Exchange looks exactly the same as the one for the  site:        This can get a bit confusing, especially if you happen to have many tabs open from both sites.  It also looks a bit silly in the site switcher menu:  All the per-site metas (and MSO, even before the MSO/MSE split) have favicons that are grayscale versions of the main site icons.  Why not do the same for MSE? Conveniently, michaelb958 already wrote a nice  to do just that (and I  it to apply to the menu too), so you can easily see for yourself how it would look.  Or just see the screenshot below:  So here's my proposal: Let's make this gray icon the official MSE favicon.  Update: The meta.SE favicon has recently been changed to a simplified outline version of the SE logo:  I'm not sure how much I like the new logo (for one thing, it doesn't seem to match the dimensions of the main SE logo), but at least it's different, which was the main point of this request. Typesetting a full citation whose title ends with a word in braces I am using Biblatex and need to typeset full citations in my document text, so I'm using .  While it works correctly most of the time, it has trouble with Biber/BibTeX entries where the last word of a field is enclosed in braces (to force capitalization).  In these cases, \longfullcite may fail to properly capitalize the following word.  Take the following example:  \documentclass{article}  \usepackage{biblatex} \makeatletter \newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{\blx@maxbibnames}#1} \makeatother \DeclareCiteCommand{\longfullcite}[\tempmaxup]   {\usebibmacro{prenote}}   {\usedriver      {\DeclareNameAlias{sortname}{default}}      {\thefield{entrytype}}}   {\multicitedelim}   {\usebibmacro{postnote}}  \usepackage{filecontents}  \begin{filecontents}{test.bib} @inproceedings{blow2015,   author       = {Blow, Joe},   title        = {{GNU} loves me},   year         = 2015,   booktitle    = {Proceedings of Some Conference}, }  @inproceedings{blow2016,   author       = {Blow, Joe},   title        = {I love {GNU}},   year         = 2016,   booktitle    = {Proceedings of Some Conference}, } \end{filecontents}  \addbibresource{test.bib}  \begin{document} \nocite{*} \noindent \longfullcite{blow2015}\\ \longfullcite{blow2016} \printbibliography \end{document}   Here is the output:    Note the inconsistent capitalization of the word "In" produced by the two \longfullcite commands.  By contrast, the citations emitted by \printbibliography correctly capitalize "In" for both entries.  What is causing this inconsistency and how can I fix or work around it (preferably by changing the definition of \longfullcite rather than changing the .bib file)? Pagination returns 404 after page 20 Two arrays in foreach loop How to disable the keyring for SSH and GPG? I want to upgrade my Ubuntu 13.04 to Ubuntu 13.10. I'm unable to do via GUI.   [ The reason why I'm unable to do so:  Via software updater, I proceed ahead and click upgrade (for upgrading my OS). I authenticate by providing my password. Then it proceeds and downloads upgrade tool. That time only (while downloading the tool) error message comes "system program problem detected". It then doesn't proceed ahead and I click to report the problem ]  So, I tried via command line but here also I couldn't succeed upgrading my OS.  For the same I ran   $ sudo apt-get update   Then I ran  $ sudo apt-get dist-upgrade   And then:  ravbholua@ravbholua-Aspire-5315:~$ sudo do-release-upgrade Checking for a new Ubuntu release Get:1 Upgrade tool signature [198 B]                                                                                                  Get:2 Upgrade tool [1,135 kB]                                                                                                         Fetched 1,135 kB in 6s (32.9 kB/s)                                                                                                    authenticate 'saucy.tar.gz' against 'saucy.tar.gz.gpg'  gpg exited 2 Debug information:    gpg: Signature made Friday 01 November 2013 10:34:27 AM IST using DSA key ID 437D05B5 gpg: Can't check signature: public key not found  Authentication failed Authenticating the upgrade failed. There may be a problem with the network or with the server.  ravbholua@ravbholua-Aspire-5315:~$    Please suggest how to go ahead and upgrade my OS. Long site name hides the diamond in profile page Communities Boarding a train in India at another station I have booked a ticket on a train from Mumbai to Chennai and boarding at Pune. Since my schedules have changed, I will be in Mumbai on that day. Can I board the same train in Mumbai in my own ticket and claim the seat/berth? Schengen visa permit I am a student with a Singapore passport currently studying in the Czech Republic for a semester. My permit is valid until 2nd of February, I plan to fly to the UK to travel for 3 days before heading back to Singapore from there.  Would there be any problems, such as exit immigration from the Czech Republic to the UK? I searched online that the UK is not part of Schengen Area Agreement states, and my passport has a visa free entry to the UK. I encountered such a formula for pooled variance:  $$\frac{(n-1)s_x^2+(m-1)s_y^2}{n+m-2}\left(\frac{1}{n} + \frac{1}{m}\right)$$  Here we have two samples of the following sizes $n$ and $m$. $s_x, s_y$ are the sample variances.  I understand that the first term is a weighted average, but from the second term comes? Changing projection of shapefile in QGIS How do I change the projection of my shapefile using QGIS? The default projection is set to EPSG:3003, I want to change it to WGS84 EPSG:32632. When I do a reprojection or I change projection in the properties mask I don't have the correct result. On the left, I have the plan coordinates but they are not correct for the EPSG shown on the right: Should we write “allow” or ”allows” in “require that the class allow[s]”? Can you explain to me whether I should or should not use ‑s at the end of the  verb allow in this sentence?     This function requires that the container class allow[s] random access   The sentence in the book I read wrote allow without ‑s. However, the container class is a third-person singular, so the ‑s must be required. Is that right? Rendering smoke in Cycles? I'm always on the hunt for free stock images to use while I design, what are some good resources for images that are under a a royalty free or creative commons licence? According to  and my own understanding, the tilde expands to the home directory:  $ echo ~ /home/braiam   Now, whenever I want the shell expansion to work, i. e. using variable names such $FOO, and do not break due unexpected characters, such spaces, etc. one should use double quotes ":  $ FOO="some string with spaces" $ BAR="echo $FOO" $ echo $BAR echo some string with spaces   Why doesn't this expansion works with the tilde?  $ echo ~/some/path /home/braiam/some/path $ echo "~/some/path" ~/some/path Why does `md5sum` not give the same hash as the Internet does? I want to find the md5 hash of the string "a", but running echo "a" | md5sum gives me another hash than what I get if I search the internet (for example using  or ).  Running echo "a" | md5sum gives me "60b725f10c9c85c70d97880dfe8191b3", but it should be "0cc175b9c0f1b6a831c399e269772661".  If I make a reverse hash lookup for "60b725f10c9c85c70d97880dfe8191b3", I do however get "a". How to search for upcoming conferences that will be held in a specific subject The div containing tags for a question doesn't reflow, causing layout issues for questions with long/many tags This appears to be a css bug which (I think) has recently been introduced. It's most visible when viewing questions on Stack Exchange sites using mobile devices (the full site with responsiveness, not the mobile site) but can easily be reproduced by resizing a browser window on a question where the combined width of the tags is large. A couple of example questions show this behaviour:  On Meta Stack Overflow:   On Meta Stack Exchange:     Using the Meta Stack Overflow question to demonstrate (as the total width of the tags is larger):  At 1100px, the tags just about fit into their containing div.     At 800px, the tags appear on top of related questions:     At 450px, the tags are now wider than the view (the last tag is completely off the screen), causing scroll bars to appear:      This doesn't happen to lists of questions - the tags flow onto multiple lines:     Reproduced on: { Firefox 81, Chrome 84, Edge 84 } on Windows 10, and Chrome 85 on Android 11. How quickly is the desired state of curl of the Electric Field around a point achieved where a Magnetic Field Vector has just begun changing? My question and context with explanation are given below. Thank you in advance.   Faraday’s Law () states that a time-changing magnetic field vector induces a curl of the Electric field around that point. However it does not specify how quickly the necessary spatial gradient is developed in the Electric Field to satisfy that curl. Of course, the Electric Field vectors around that point cannot just jump to the required values instantaneously in accompaniment as soon as the magnetic field starts changing at a fixed rate, since it is required that the Electric Field has a sensible rate of change to in turn induce a curl of the magnetic Field and continue the propagation of the wave. It would seem the exact rates at which the Electric and Magnetic Fields are changing is critical in the mechanism of an EM wave’s propagation. How would I then calculate the rate of change of E somewhere along the wave given I know the rate of change of the B vector that began it, and given the wave is restricted to one dimension for simplicity? There should after all be some delay in how the EM wave moves from point to point in space, seeing as it moves at the finite speed of causality (3*10^8 m/s), as shown in the first image:    Some of my ideas so far have been that perhaps the rate of change of E is determined such that it exactly cancels the growth of the time-changing E vector that gave rise to a curl of B before, which developed at such a rate to induce a curl of E, which demands this rate of change of E which I am talking about now. In this way the wave might level out the growth of the fields in its wake and spread the change further outwards, in the same way smoothening out a crease spreads it elsewhere. However I am stuck on how to show this rigorously.  I am open to any difficulty of maths, so long as the answer provides the explanation. Below are some diagrams to help visualize what I am talking about:    Faraday's Law requires that a curl of E is developed, which under these restrictions requires a spatial gradient of E to appear across that point. Since the field across that point was previously in some other state, it is required that the Electric Field vectors that are infinitesimally close to that point undergo a rate of change through time to achieve the desired state of curl. The question is, how quickly is this desired state of curl achieved? Returning from Dual-boot to just Windows I installed Ubuntu sometime back along side Vista, but later found that I rarely (if ever) use Ubuntu. How easy is it to return my computer to its initial state of having only one OS, and freeing up the hard-drive space used by the Ubuntu install?