Is there any difference between a directory name such as  mydirectory   and  mydirectory/   I noticed this happens when I execute ls in some directories - some of the directory names have a slash and some don't. This is problematic because if I want to access a file contained in a directory, I may need to add a slash at the end:  vi $mydirectory"/"$myfile   or simply do   vi $mydirectory$myfile
Possible Duplicate:          Most commands I use in linux behave exactly the same whether I include the trailing slash / character on the end of a directory name or not.  For example:  ls /home/cklein ls /home/cklein/  cp foo bar cp foo/ bar/   When does this trailing slash matter?  What is the semantic meaning of the trailing slash?
I tried to find this question somewhere else on here, and found a couple that were similar to it -- but all the answers seemed pretty convoluted, and I think it was surprising to me because I just imagined that SQL would have a way easier way to do this.  Essentially, I'm using a GROUP BY to group two values on top of each other. The coding is simple and works well, where I get these results using WITH ROLLUP at the end:  Type    Person  Count Type A  Person 1    10 Type A  Person 2    91 Type A  Person 3    13 Type A  Person 4    10 Type A  Person 5    2 Type A  NULL        126 Type B  Person 6    16 Type B  Person 7    63 Type B  Person 8    15 Type B  Person 9    22 Type B  Person 10   16 Type B  Person 11   3 Type B  Person 12   20 Type B  Person 13   44 Type B  NULL        198 NULL    NULL        360   Is there an easy way to substitute something saying if "NULL" is in the "Person" column, then make NULL AS "Subtotal" and if "NULL" is in the "Type" column, NULL AS "Grand Total?"  And if that's weirdly complicated, I'd be totally fine with just calling all of them "Total."  Thanks! Convert a comma delimited list of numbers to a hyphenated list or range Partition of a set and Hall's theorem Can I get more than 1000 records from a DirectorySearcher? I just noticed that the return list for results is limited to 1000. I have more than 1000 groups in my domain (HUGE domain). How can I get more than 1000 records? Can I start at a later record? Can I cut it up into multiple searches?  Here is my query:  DirectoryEntry dirEnt = new DirectoryEntry("LDAP://dhuba1kwtn004"); string[] loadProps = new string[] { "cn", "samaccountname", "name", "distinguishedname" }; DirectorySearcher srch = new DirectorySearcher(dirEnt, "(objectClass=Group)", loadProps); var results = srch.FindAll();   I have tried to set srch.SizeLimit = 2000;, but that doesn't seem to work. Any ideas? Apologies if this has been asked somewhere before, but I didn't see what I was looking for after several pages of Google results.  I was reading Jech's The Axiom of Choice and was introduced to the equivalence of the ultrafilter lemma and the compactness theorem for FOL. I gather that these are also equivalent to the completeness theorem. I am primarily interested in trying to understand the "ultrafilter lemma $\implies$ completeness/compactness" direction. Jech's own proof takes an odd route through "binary messes" and I don't really follow the last couple of steps. (It's on pp.17,18 of the 2008 Dover reprint, if one is interested).  I'm wondering if anyone knows a good reference for, or can provide, a readable proof that the ultrafilter lemma implies completeness or compactness, with a preference for completeness. Alternatively, if you have Jech's book on hand, helping me bridge the concluding paragraph of his $\textrm{(ii)}\implies\textrm{(iii)}$ step with the preceding steps would clear up much of my puzzlement. (Though in this case I can't offer any help in saying what, specifically, is missing in the way of a bridge). How do I fix a NoSuchMethodError? Is there a ".bashrc" equivalent file read by all shells? Is ~/.bashrc  the only place to specify user specific environment variables, aliases, modifications to PATH variable, etc?  I ask because it seems that ~/.bashrc seems to be bash-only, but other shells exist too… Why are high white balance temperatures redder when warmer objects are bluer? I know it's dumb to ask this type of questions. But, I still don't get this. I've read the "Black body" story and know that when it's heated, it gives off colors; 'warm' colors (red→orange→yellow..) that have low color temperatures, at low temperatures, (I mean, when it is cooler than afterwards) right? And, the black body gives off 'cold' colors (white→blue..) that have high color temperatures at high temperatures (when it is hotter than before), right? Correct? So there're two, yes, very dumb, questions and the latter one is dumber..     Why are that 'warm' colors said to have low temperatures? And 'cold' colors vice versa? So the redder colors have lower c/t and bluer colors have higher c/t, then   why does the camera's color temperature - adjusting slider has the bluer colors on the left, and the redders on the right?       Please, forgive me for my ignorance... Transparency/Masking : See through an Outer Sphere and see Inner Sphere in true colours Summary  I want to be able to look through an outer sphere - BlueSphere, and see another sphere inside - RedSphere  This is the target goal I'm trying to get to:    Issues  Here is what I have tried, and the problems I'm having:  1)  If I set the spheres transparency alpha values to 0.75    - then the inner RedSphere does not take on its "true" colour and shows as blue instead of red.    2)  If I set the spheres transparency alpha to lower values of 0.5   the spheres lose their crispness which I don't want and the inner RedSphere still does not take on its "true" colour   { can't paste a 3rd sample - need more reputation points }   Background  I am animating two spheres, one inside the other, superimposed about a common origin.   At the start:   the outer BlueSphere is at full radius the inner RedSphere is at zero radius  As time progresses:   the outer BlueSphere shrinks the inner RedSphere expands    So what happens is the expanding inner RedSphere "bursts through" the contracting outer BlueSphere.  So the effect I am looking for is to see the RedSphere appearing as Red as it expands inside the BlueSphere.  Thinking/Logic  So I figure that transparency is not the way to go.  The transparency settings are behaving correctly - as one would expect, in a "real world" situation - the inner sphere (Red) takes on the colour of the outer sphere (Blue) seeing as we are looking through a (transparent) Blue material.  Any ideas on what approach to take ?  It's almost as if I should be "removing" the part of the BlueSphere that the RedSphere "occupies" so that we see the RedSphere directly without any BlueSphere between us and the RedSphere.  Some sort of masking ??  Advice, comments, suggestions welcome. Thanks.  [requested edit]  Using internal render.  [ My End Solution - Thanks for the guidance ]  Right, so here is the way I got to my final result:  1) I created python drivers for each sphere   I used the frame_current scene property for input Passed that to a scripted expression which used sin() as the scaling factor Used some if / elif conditionals against frame_current to make the spheres visible only when I needed them   2) I created 3 layers   On Layer-1 - background   I put RedSphere AND BlueSphere with drivers driver_Outer_RedSphere() &amp; driver_Outer_BlueSphere() limiting the display of each sphere to show only where each radius > halfway  On Layer-2 - foreground-1   I put RedSphere ONLY with driver driver_Inner_RedSphere() limiting the display of RedSphere to show only where its radius &lt;= halfway  On Layer-3 - foreground-2   I put BlueSphere ONLY with driver driver_Inner_BlueSphere() limiting the display of BlueSphere to show only where its radius &lt;= halfway    3) I rendered each layer to .PNG sequence [RGBA] (alpha channel for transparency)   Render Layer-1 - background   background : [sky]  Render Layer-2 - foreground-1   background : [transparent]  Render Layer-3 - foreground-2   background : [transparent]    4) I brought all 3 sequences into the Video Sequence Editor   Strip-1 - background   blend [cross] opacity [1.00]  Strip-2 - foreground-1   blend [alpha-over] opacity [0.50]  Strip-3 - foreground-2   blend [alpha-over] opacity [0.50]    5) Rendered the 3 layer final sequence to H.264  So the "aha moment" struck me right at the end when I was in the Video Sequence Editor:   "Don't try to make the Outer Spheres transparent, and see through to the Inner Spheres" "Instead overlay the Inner Spheres over the Outer Spheres, and limit the opacity of the Inner Sphere overlay"     So now I see my Inner Spheres in their true colours, but the colours are muted due to the .75 opacity - and hence it gives the visual impression that the Inner Spheres are in fact inside the Outer Spheres.  Thanks all for the input - it got me going in the right direction. What type of lens will auto-focus on Nikon bodies without a focus motor? I want to georeference jpg map without any digitizing data Does "singular" have a common meaning across matrices, decomposition, vectors and values? Ubuntu 18.04 opening system setting logs me out I've recently installed Ubuntu 18.04 in a dual-boot configuration with Windows 10. I noticed today that, when trying to open system settings, Ubuntu seems to log me out to the lock screen. When I log back in, all previously-running applications are now closed. Very unsure what to do from here, any help much appreciated. I'm stuck in a teleporting loop. What can I do? Flattening a shallow list in Python Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  &gt;&gt;&gt; reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  &gt;&gt;&gt; [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  &gt;&gt;&gt; from itertools import chain &gt;&gt;&gt; list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  &gt;&gt;&gt; chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) &gt;&gt;&gt; print(list(chain)) &gt;&gt;&gt; [1, 2, 3, 5, 89, 6] What are our policies regarding self-harm and suicide? What should I do as a Moderator when I encounter situations regarding self-harm and suicide? How to send email from MySQL 5.1 Why does $\tan^{-1}(1)+\tan^{-1}(2)+\tan^{-1}(3)=\pi$? Playing around on wolframalpha shows $\tan^{-1}(1)+\tan^{-1}(2)+\tan^{-1}(3)=\pi$. I know $\tan^{-1}(1)=\pi/4$, but how could you compute that $\tan^{-1}(2)+\tan^{-1}(3)=\frac{3}{4}\pi$ to get this result? SEO scope for multiple domains hosting on the same IP address Probability of flipping coin What is the probability of obtaining THT before HHH when a toss is tossed sequentially? Could someone solve using state diagram and law of total probability?