Read all files in a folder and also the filenames in python?
Directory-tree listing in Python
su command + authentication failure I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure.  So I checked on the internet and then went into recovery mode and changed my username's password to what I was entering before.  Even now entering the same password on su gives me authentication failure.  Please suggest what am I doing wrong?? How to find out if an item is present in a std::vector? All I want to do is to check whether an element exists in the vector or not, so I can deal with each case.  if ( item_present )    do_this(); else    do_that(); Does D&D 5e have a rule for character knowledge about monsters? In the 3rd and 4th editions of D&amp;D, there were explicit rules for determining if a character knew anything about a monster before them.  In 3rd edition, for example, use of the  skill with a general DC of 10 + the monster's HD allowed for determining one fact, plus one fact per 5 points over the check.  Looking at the Intelligence section of the 5e PHB, I don't see any similar notation.  Does 5e provide any guidance as to when a player could use their out-of-game knowledge about a monster, or when the player might be told things their character would probably know in-game? Why are vias placed this way on a PCB? I used to check complex commercial PCBs specially those of graphics cards to see how professional PCB designers do their layout and learn from their techniques.  When I checked the card shown below I noticed two things regarding the placement of vias:  (A higher resolution image is ).   The PCB is surrounded by stitching vias all around the edges. What's the role of all of these? I think they're connected to ground to act as a shield, if that's true, I can't understand technically how by this placement they achieve this shield? By looking closer to the mounting holes, I noticed they added vias all around the pad, why? tcolorbox manual tip box, how to clone? Why is the p-value written with a supremum? I noticed that there is a definition of the pvalue in my textbook is defined says the following:    I have no idea why it is written with a supremum. I've spent hours pondering this, does anyone have enough of a background to help me with this? Thank you! Is it okay to copy-paste answers from other questions? This one leaves me with a bad taste in my mouth, but I defer to others as to whether it is appropriate or not. In , I wrote an answer to a question based on my experiences; it was upvoted and accepted, woo.  Now, today, in response to a different &#8212; but related &#8212; , someone has pasted my answer nearly verbatim (awkward English intact, I may add) as an answer.  Is that really okay? Is it a behavior that should be encouraged? Discouraged? Proof of sandwich/squeeze theorem for series. Pluralization issue on new question statistics underneath title, with views It looks like the new question statistics underneath the question title introduced a pluralization issue with views:        To be clear here, this was not an issue with the old sidebar-based question statistics; that used to properly say "viewed 1 time". Is "You are correct" correct? Where do object file "Version References" come from? Overriding public virtual functions with private functions in C++ This is a question to experienced people that might help us shed some light on the issue.   We noticed a very strange behavior on our site, in Google Analytics. Some dude from Finland, namely, from Kouvola city is hitting one of our pages - only one page on our site, 'bout a hundred times per day, all with an average bounce rate of 90%+...  This is causing our overall bounce rate to go up by 1 to 3% per day... which is very disturbing.. since we're trying to do our best in order to keep it as low as possible. And obviously having it jumped from ~24% to 27%, just because of that crazy dude is not making us happy at all... We tried implementing a geo-targeted script in order to catch this particular visitor and deliver him a juicy message, and it seemed like it helped in the beginning, it has stopped for a day or two, but now he's back...   The geo-targeted script was also logging all IP addresses for page requests originating from Finland in order to find out more details and (in order to block them on the server level, later).. but thing is, it was all mainly cable or DSL connections with various, but not constantly repeating IPs... we are all wondering what is he up to really ?   I think that this page should be kept updated with ideas on how to combat this and perhaps someone could also shed light on what it might be ? What is the reason for doing this "bounce-rate attack", as I call it?  There was a similar question asked on stackoverflow earlier, with no meaningful answer - here - A secretary with ____ good knowledge of English: "a" or no article? I'm trying to pass a test on "Articles exercise" as they call it . Reviewing my answers I got stuck about the two I posted on the picture below.  As I understand both words are uncountable (according to the ), so it looks like (or said for example ) I can't say a/an with an uncountable noun.  But this test says the opposite. Is there some trick? Or am I just dumb? Please help me to understand why I need to use "a" article in these cases?        We need a secretary with ____ good knowledge of English.          a  (marked as the correct answer)   the     a / the     no article is needed (the answer I think is correct)        We're having ____ terrible weather.         a (marked as the correct answer)     the     a / the     no article is needed (the answer I think is correct) I'm running into this weird problem with Google spreadsheets: if the cells have comments on them and I sort the spreadsheet, the rows sort but the comments stay in the same position, and don't move with the cells they're attached to.  In other words, the cells look like this:  A C  &lt;-- comment on this cell B   and then I sort by this column:  A B  &lt;-- comment remains on this cell (stays in position) C  &lt;-- comment should have remained attached to this cell   This means that sorting is completely broken and I can't use it at all, because I clearly need the cell comments to stay with the cell they're attached to.  Is this a bad bug in Google Spreadsheets, or am I missing something here? Calling a parent window function from an iframe When to capitalize words such as "lake", and when can the whole word be omitted? Which of the following sentences are correct?     "He gave two examples of large lakes, Lake Michigan and Lake   Superior."      "He gave two examples of large lakes, Michigan and Superior."      "He gave two examples of large Lakes, Michigan and Superior."      "He gave two examples of large lakes, Lakes Michigan and Superior."   This question is primarily about what variants are formally correct, not which one sounds the best.  I think that the question should be valid for several words of the same kind, such as mountain (Mount), figure (Figure), table (Table) and so on. Switch from single to double column in the same page How to create a SQL Server function to "join" multiple rows from a subquery into a single delimited field? To illustrate, assume that I have two tables as follows:  VehicleID Name 1         Chuck 2         Larry  LocationID VehicleID City 1          1         New York 2          1         Seattle 3          1         Vancouver 4          2         Los Angeles 5          2         Houston   I want to write a query to return the following results:  VehicleID Name    Locations 1         Chuck   New York, Seattle, Vancouver 2         Larry   Los Angeles, Houston   I know that this can be done using server side cursors, ie:  DECLARE @VehicleID int DECLARE @VehicleName varchar(100) DECLARE @LocationCity varchar(100) DECLARE @Locations varchar(4000) DECLARE @Results TABLE (   VehicleID int   Name varchar(100)   Locations varchar(4000) )  DECLARE VehiclesCursor CURSOR FOR SELECT   [VehicleID] , [Name] FROM [Vehicles]  OPEN VehiclesCursor  FETCH NEXT FROM VehiclesCursor INTO   @VehicleID , @VehicleName WHILE @@FETCH_STATUS = 0 BEGIN    SET @Locations = ''    DECLARE LocationsCursor CURSOR FOR   SELECT     [City]   FROM [Locations]   WHERE [VehicleID] = @VehicleID    OPEN LocationsCursor    FETCH NEXT FROM LocationsCursor INTO     @LocationCity   WHILE @@FETCH_STATUS = 0   BEGIN     SET @Locations = @Locations + @LocationCity      FETCH NEXT FROM LocationsCursor INTO       @LocationCity   END   CLOSE LocationsCursor   DEALLOCATE LocationsCursor    INSERT INTO @Results (VehicleID, Name, Locations) SELECT @VehicleID, @Name, @Locations  END      CLOSE VehiclesCursor DEALLOCATE VehiclesCursor  SELECT * FROM @Results   However, as you can see, this requires a great deal of code.  What I would like is a generic function that would allow me to do something like this:  SELECT VehicleID      , Name      , JOIN(SELECT City FROM Locations WHERE VehicleID = Vehicles.VehicleID, ', ') AS Locations FROM Vehicles   Is this possible?  Or something similar? Quotient rings of Gaussian integers