The closest I got was umask to change the default permissions set for files/folders. However, umask doesn't seem to allow enabling the x bit for files:  The base permissions for directories are 0777 (rwxrwxrwx) and for files they are 0666 (rw-rw-rw-).   I also saw this  which makes sense, but still, umask clearly has an involvement in the issue, not just touch's code, because when I change umask, touch's results are affected).  Is there any way to create files with the execution bit set, at least for the user section (ideally -rwx-r-x-r-x = 755)
When writing answers on here, it's often necessary to create a new script and chmod +x it to make it executable. I won't go into whether this is a good thing or not, but explaining to people that they need to fire in three separate command (and teaching them to use nano!) is a bit of a waffle.  Is there anything easier?
Questions can be protected (i.e. marked "highly active").   What does it mean for a question to be protected? Why are some questions protected? Who can protect and unprotect questions? Who can answer a protected question? How are protected questions displayed? When should I protect or unprotect a question? When does the Community user protect a question? How can I calculate the number of work days between two dates in SQL Server?   Monday to Friday and it must be T-SQL. How do I recover my Google account (or Gmail) password or username? I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&amp;A is meant as a general description for all Google and Gmail username/password questions. See: ) Center of $D_6$ is $\mathbb{Z}_2$ The center of $D_6$ is isomorphic to $\mathbb{Z}_2$.   I have that $$D_6=\left&lt; a,b \mid a^6=b^2=e,\, ba=a^{-1}b\right&gt;$$ $$\Rightarrow D_6=\{e,a,a^2,a^3,a^4,a^5,b,ab,a^2b,a^3b,a^4b,a^5b\}.$$ My method for trying to do this has been just checking elements that could be candidates. I've widdled it down to that the only elements that commute with all of $D_6$ must be $\{e,a^3\}$ but I got there by finding a pair of elements that didn't commute for all other elements and I still haven't even shown that $a^3$ commutes with everything. For example, I have been trying to show now that $$a^3b=ba^3$$ and haven't gotten too far yet but if I had to answer a question like this on the exam, I feel it would be difficult, is there any kind of trick or hints other than brute force using the relations to get that $a^3$ commutes with everything?  For the solution once I have that the center of $D_6$ is what I think then as there is only one group of order $2$ up to isomorphism, it must be isomorphic to $\mathbb{Z}_2$.  Ideally a way that doesn't appeal to $D_6$ as symmetries of the hexagon if that seems possible. Using notify-send with cron I am using Arch Linux with KDE/Awesome WM. I am trying to get  notify-send to work with cron.   I have tried setting DISPLAY/XAUTHORITY variables, and running notify-send with "sudo -u", all without result.  I am able to call notify-send interactively from the session and get notifications.  FWIW, the cron job is running fine which I verified by echoing stuff to a temporary file. It is just the "notify-send" that fails to work.  Code:  [matrix@morpheus ~]$ crontab -l * * * * *  /home/matrix/scripts/notify.sh  [matrix@morpheus ~]$ cat /home/matrix/scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority echo "testing cron" &gt;/tmp/crontest sudo -u matrix /usr/bin/notify-send "hello" echo "now tested notify-send" &gt;&gt;/tmp/crontest  [matrix@morpheus ~]$ cat /tmp/crontest testing cron now tested notify-send  [matrix@morpheus ~]$    As you can see the echo before &amp; after notify-send worked. Also I have tried setting DISPLAY=:0.0   UPDATE: I searched a bit more and  needs to be set. And after hardcoding this using the value I got from my interactive session, the tiny little "hello" message started popping up on the screen every minute!   But the catch is this variable is not permanent per that post, so I'll have try the the named pipe solution suggested there.   [matrix@morpheus ~]$ cat scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BouFPQKgqg,guid=64b483d7678f2196e780849752e67d3c echo "testing cron" &gt;/tmp/crontest /usr/bin/notify-send "hello" echo "now tested notify-send" &gt;&gt;/tmp/crontest   Since cron doesn't seem to support notify-send (at least not directly) is there some other notification system that is more cron friendly that I can use? How to get file extension from string in C++ Given a string "filename.conf", how to I verify the extension part?  I need a cross platform solution. What is the difference between "var=${var:-word}" and "var=${var:=word}"? I have a fairly modern desktop computer, an AMD Athlon II X2 based silent PC, that does not work.  When turned on, it will start physically (all fans are rotating, disks start up...) but not give a signal on any of the graphics ports (DVI, VGA, and HDMI, I tried all three). Also, the reset button does not seem to have any effect.  I have stripped the mainboard bare of all SATA connections, extension cards, and the one 2GB RAM chip to eliminate them as the problem source, but to no avail, so I think it's fair to assume it's either the mainboard or the processor that are at fault.  However, I have neither a replacement mainboard, nor a replacement processor handy to identify which one is broken. The cause of the defect is unknown, so for all I know, it could be both. Therefore, I'm reluctant to buy replacement hardware blindly before knowing more.   Is there any way to further diagnose (or at least get some indication) which component is broken without buying replacement hardware? Properties of the greatest common divisor: $\gcd(a, b) = \gcd(a, b-a)$ and $\gcd(a, b) = \gcd(a, b \text{ mod } a)$ Prove that (a) gcd(a, b) = gcd (a, b – a) (b) Let r be the remainder if we divide b by a. Then gcd(a, b) = gcd(a, r).  I solved part a like: Assume a=pcommonpa b=pcommonpb gcd (a,b) = pcommon b-a = pcommon*(pb-pa)  So: gcd(a, b-a) = common again But I need help for part b guys I can solve it but I need a mathematical expression. Are the limits $\lim\limits_{n\to \infty }\left|\frac{a_{n+1}}{a_n}\right|\,$ and $\lim\limits_{n\to \infty }\sqrt[n]{|a_n|}\,$ equal? Let consider the power series $$ \sum_{k=1}^\infty a_kx^k. $$ We know that it converges when  $$\lim_{n\to \infty }\sqrt[n]{|a_n|}|x|&lt; 1\quad\text{or}\quad |x|&lt; \frac{1}{\lim_{n\to \infty }\sqrt[n]{|a_n|}}$$  But D'Alembert test tells us that it converges if $$|x|&lt; \frac{1}{\lim_{n\to \infty }\left|\frac{a_{n+1}}{a_n}\right|},$$ so since the radius of convergence is unique, we should have that $$\lim_{n\to \infty }\sqrt[n]{|a_n|}=\lim_{n\to \infty }\left|\frac{a_{n+1}}{a_n}\right|.$$  I tried to prove it, but this result looks strange to me. So if it doesn't work always, how can we have those to limit as radius of convergence? I guess the equality of those two limit should be true most of the time.  So under what conditions is it true? Why are mirrorless cameras much slower than DSLRs? This is a follow-up to a .  I've been comparing cycle times (or shot to shot times in single shot mode) of mirrorless cameras with interchangeable lenses with traditional DSLRs and all of them, even the highest end ones (like the Olympus OM-D EM-5 or Panasonic GH3) are slower than even entry level DSLRs.  How's that possible? The electronics should be the same and they don't have the burden of a mirror going up and down between each shot. I think that there must be a technical reason for that (maybe some cpu time is going to feed the live-view before the image is encoded?), because from a commercial point of view it does not make sense.  I've seen the cycle times under the performance tab in the reviews pages of .  The average CSC has cycle times around 0.7~1.2s, the flagship ones around 0.5s. The average DSLR has cycle times around 0.4s and the flagships around 0.25s. When should N-Gons be used, and when shouldn't they? Support for N-Gons (polygons consisting of more than 4 vertices) has been in Blender for a while now, but many of us still may not know when to use them, and how to do so effectively.  In what situations do N-Gons really come in handy? When should they be just plain left out? Do they have any place in finished models? I am trying cmd --> MMC --> Server Manager and then connecting to my Server 2012 no GUI  but i keep getting the following error The WinRM client cannot process the request  I am unable to upload images right now  This is not related to other post "How to Remote Manage Windows Server 2012 in Server Manager?" because title and description of that post is quite different from what i am asking Why don't virtual particles violate conservation of mass/energy? Record a macro of windows commands How can I make a fake name when I use command blocks? I'm trying to make a mini game but I want it so that when you press a button over a command block it will say "BOB welcome", so 'bob' instead of the @a or @p sign and then followed by the message. All I know is that I need to use /tellraw. If a mass moves close to the speed of light, does it turn into a black hole? I just reached the 3k rep limit required for close votes and have started exploring the vote-to-close UI that's opened up to me, and I have a request.  The review queue has a Do Not Close button, but when I click the close link under a question that has close votes (i.e. it shows close (1)), there isn't an option for me to vote against closing the question. I came across a question that had a vote to close it as not a question, but it had just been updated with code and more details and was no longer a candidate for closing. However, I couldn't cast a vote to not close it from the question itself. When I clicked on close, it brought up the usual voting UI, and "Do Not Close" was not an option.  TL;DR, do this:   Open a question in the close votes review queue Note the Do Not Close button Click the question title to go to it Click the close (n) link under the question (assuming it hasn't already been closed) Notice the lack of an equivalent "Do Not Close" option   Could a "Do Not Close" option be added to the close button popup for questions that already have close votes, that way the review interface isn't the only place a "Do Not Close" vote can be cast?  Edit: Okay, so 5 3 "Do Not Close" votes kicks it out of the review queue, it doesn't have "no effect" as suggested in the comments. (See , in which the  was just updated a few minutes ago to say 3 DNC votes.) I still don't see why the same DNC option can't be available from the question.  Basically, I guess I would like some rationale behind this bullet point from :     Only accessible from the review queue (so rather difficult to target a specific question). Yes, this is very much by-design. In Texas Hold'em poker, there are some cases where a particular card, often called kicker, acts as a tiebreaker between players to determine who wins the pot, or if the pot has to be shared.  For some combinations such as three or four of a kind, there is no doubt: the kicker is the 5th card of the chosen combination, and determines the winner.  Example     Alice has 7 and 10   Bob has 7 and K   On the board are 7, 7, 2, 3, 4   In that case, both have a three of a kind. But because Bob has a king and Alice only a 10, he wins.  Most of poker websites explaining the rules clearly mention the role of the kicker applying to three of a kind and double pairs. But much fewer say something about colors, straights and full houses, and I found many contradicting answers. I also asked the question to some used online poker players and they also gave me contradicting answers.  I have tried to search for official tournament rules, but most of them only explain what happens with bad behaviors, bad deals, incorrect or confusing betting, showing cards when you shouldn't, acting when it's not your turn, etc. without mentioning subtleties about combinations at all.  To simplify my question, I will take three examples; I think it's better to start with examples before getting to the general answer if one exists. So, what's happening in the following 3 examples? Could you give a more generalized answer?  Example 1 - Flushes     Alice has 2&clubs; and 3&clubs;   Bob has 4&clubs; and 5&clubs;   On the board are 6&clubs;, 8&clubs;, 10&clubs;, 2&hearts;, 5&diams;   Contradicting answer 1: it's a tie, because the highest card included in the flush is the 10, which everybody chooses to include in their 5 showdown cards. Contradicting answer 2: Bob wins, because he has the greatest private card that is part of the flush  Example 2 - Straight     Alice has 6 and K   Bob has 6 and J   On the board are 4, 5, 7, 8, 10   Contradicting answer 1: it's a tie, because the greatest card in the straight is the 8 for both Alice and Bob Contradicting answer 2: Alice wins, because she owns an extra king, compared to the jack of Bob  Example 3 - Full house     Alice has 3 and 7   Bob has 3 and 6   On the board are 3, 3, 2, 2, 5   Contradicting answer 1: it's a tie, because one is supposed to choose only five cards to make a combination, and a full house is already five cards. There couldn't be any kicker, and thus their showdowns are strictly equals. Contradicting answer 2: Alice wins because of her extra 7, compared to the 6 of Bob  Thank you very much for your answers.  Note: I'm unable to post next to you, so I edit my own post; strange not be able to answer to an answer.  Ok, So if I summarize what you are saying :   In the flush case, Bob wins because at some point, their hand differs. Technically, I can continue comparing the highest private card to decide who wins. I had it correct. In the straight case, if the highest card of the straight is public, then it's technically always a tie, no matter what the players had as second private card (asuming that only one of the two cards was part of the straight). In a full house if both players have the same triplet and the same pair, it's always a tie, no matter what the players had as second private card (assuming again that only one of the two was part of the full house).   Please confirm me that what I summarized is correct.  Thank you for your answer. Types of circular acceleration? To my knowledge there are three types of acceleration when a body (e.g. a rod) is moving in a circle about an axis. These are:   Angular acceleration : this is the rate of change of angular velocity. Tangential acceleration : this is the linear acceleration of the system in a tangential direction to the circle and equals the radius times the angular acceleration. Radial/centripetal acceleration : this is the linear acceleration of the system that is directed inwards towards the center of the circle.   I also think there are two types of velocity:   Linear velocity: this is its velocity in the tangential direction and is constantly changing Angular velocity or angular frequency: this is the rate of change of angle.   Is the above correct? And have I missed anything?