Shouldn't it be .*\.ext to match files ending with extension "ext", from the aspect of regular expression?  I have tried ls *.sh, which can show all the shell script file. But if I change to ls .*\.ext, it doesn't match the shell script file though.
I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?
Last Logon Time of All Users - RDP server not on a domain How do you make an image emission without washing out the image? I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.  I assume it would be an alteration of this:  rec=0 def autoIncrement():  global rec  pStart = 1   pInterval = 1   if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec Show the reason given for a close vote before the question gets closed If a question gets votes to close but no answer or comment stating the reason for the vote, the OP has no way of knowing if editing would solve the problem.  Show to the asker the reasons (but not who voted) given for a vote to close so they can attempt to correct the problem without having to resort to begging for a reopen or reposting an edited version and risk being called a duplicate. DropDown list onchange event and AJAX in MVC When should "Mom" and "Dad" be capitalized? I am trying to understand capitalization rules with Mom and Dad. I believe I have it correct below, but please let me know if I do not.     The one thing I learned from my dad was that it was good to earn the trust of one's children. Dad has shown me how good that a dad can be. One day when I went to his house, and Dad wasn't there, I ran outside....   The above passage is just made-up just so that you would see what I mean about capitalization. Let's put numbers by each one, like so:     The one thing I learned from my dad(1) was that it was good to earn the trust of one's children. Dad(2) has shown me how good that a dad(3) can be. One day when I went to his house, and Dad(4) wasn't there, I ran outside....    This is one where I'm not certain. I believe in this sense I'm showing possession here with "my", and it just didn't seem right saying "my Dad". I don't know what the grammar rule is here, or if I even have it right. This one is obvious—it starts the sentence. In this case, I'm using Dad like a name instead of saying "Larry". Therefore, it should be capitalized. Again, just like 3. Suppose that an entire function $f(z)$ satisfies $\left|f(z)\right|\leq k\left|z\right|^n$ for sufficiently large $\left|z\right|$, where $n\in\mathbb{Z^+}$ and $k&gt;0$ is constant. Show that $f$ is a polynomial of degree at most $n$. First player rolls a 6-sided die 100 times and the second player 101 times. What are the odds of the second player getting more odd numbers than the first one?  I tried solving this via listing the options which led to a nasty sum that I wasn't able to solve neither by hand nor by using wolfram alpha. Clearly there has to be a more clever solution using the properties of a binomial distribution, but so far I haven't come across anything useful. I've tried to import but I don't see the (.max) file as an option when importing. Is there another way to import the 3DMax model into Blender for rigging and animation? Have Chrome autodetect language before spelling checking? Evaluate  $$\lim_{n\to\infty} \left(\frac{1^p+2^p+3^p + \cdots + n^p}{n^p} - \frac{n}{p+1}\right)$$ I'm batch processing a folder of image to a uniform width with GraphicsMagick (though I assume the same would apply to ImageMagick):  $ gm convert -resize 1000x in.jpg out.jpg   But when I inspect some of the images, I get 999px instead of 1000px.  $ gm identify -verbose out.jpg  ==&gt; Image: out.jpg ==&gt; Format: JPEG (Joint Photographic Experts Group JFIF format ==&gt;   Geometry: 999x591   Is there a way to enforce the right width? I assume it's doing some estimation to preserve aspect ratios. I have a script that I need to execute on an NTFS partition. The script's permission is set to 600.  I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a failure or anything - but it also doesn't change the permissions on the file:  $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700  $ chmod 755 script.sh $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700   As you can see, it remains unchanged. I googled it but I couldn't find the answer... maybe I didn't seek it in the proper way. My question is if &quot;to&quot; must be repeated in sentences such as the following ones:   In the past, women used to do the housework and to take care of children.  The aim of this meeting is to control their progress and to discuss the new working plan.    If I had to bet, I would omit the second to... But I am not sure about it. Existence of a Riemannian metric inducing a given distance. Let $M$ be a smooth, finite-dimensional manifold. Suppose $M$ is also a metric space, with a given distance function $d: M \times M \rightarrow \mathbb{R}_{+}$, which is compatible with the original (manifold) topology on $M$.  Question: is there a Riemannian metric $g$ on $M$ such that the distance $$d_g(p, q) = \inf_{\gamma \in \Omega(p, q)} L_g(\gamma)$$ coincides with $d$?  I believe that this setting is very standard, but for the sake of completeness: $L_g$ denotes the Riemannian length of the curve $\gamma$, and $\Omega(p, q)$ the set of all piecewise smooth curves $\gamma : [a, b] \rightarrow M$ s.t. $\gamma(a) = p$ and $\gamma(b) = q$. Thanks in advance. I've searched the net for such information and found different command lines, like these ones:  sudo apt-get remove application sudo apt-get remove application*  sudo apt-get remove --purge application sudo apt-get remove --purge application*  sudo apt-get purge application sudo apt-get purge application*   So, what is the correct way? Is it necessary to use that "*"?  After that, I also found these commands:  sudo updatedb sudo locate application sudo rm -rf (file/folder name) How might the weight of a falling object affect the damage it causes? Fall damage is 1d6 per 10 feet. What adjustments if any should I make for objects falling on a player character? (e.g. a bear)  Assuming the objects are meaningful threats but not instant character death, should the weight of an object change the calculation, e.g. more then 1d6 per 10 feet.  Or is this more in the spirit of improvising damage chart? i.e. the setback (cat to face) dangerous (orc fell on me), and deadly (the large bear).  If this is house-rule territory does any one have any experience or advice beyond  relevant to 5e. I downloaded Facade from the official website. After installing it, I tried to play it, but after the initial loading screen, the game vanished into just the outline of the window it was in. The sound works fine, and the hand still appears where the mouse is, and I can type responses, but there is no visual at all. I tried adjusting my computer to the resolution it mentions on the website but my computer's resolution won't go low enough. Is there a way to fix this or is the game not compatible with my pc?   Device Manager lists my graphics card as:     Mobile Intel (R) 45 Express Chipset Family (Microsoft Corporation - WDDM1.1) I was reasonably certain I've seen this before, but I was wondering how to solve the Diophantine equation  $$a^2+b^2=c^2+d^2$$  I tried a web search and found nothing on this one.  I'm trying to avoid another library trip to a less than local library (maybe I should have taken better notes on that chapter...).  I'm not quite sure how to handle this one.  The only thing I can figure out with this equation, if I remember correctly, is that the sum on either side may only contain prime factors of 2 or odd primes congruent to 1 mod 4.  And if I don't want a and b equal to c and d, the sum can't be prime as I believe a prime congruent to 1 mod 4 can be represented as the sum of 2 squares in exactly one way.  But that doesn't give me any insight into actually solving this problem. I faced this issue when I want to use sudo command :  sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   then I tried a solution from a similar question in order to change the owner back to the root:   $ pkexec visudo   also I tried this one   $ pkexec chown root:root /etc/sudoers /etc/sudoers.d -R   but I have faced another issue with these commands:   Error getting authority: Error initializing authority: Could not connect: No such file or directory   So is there a solution to this issue?    Full shell issue snippets:   ubuntu@LAPTOP-D4T16P7J:~$ sudo -i sudo: /etc/sudoers is owned by uid 1000, should be 0 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin ubuntu@LAPTOP-D4T16P7J:~$ pkexec visudo Error getting authority: Error initializing authority: Could not connect: No such file or directory ubuntu@LAPTOP-D4T16P7J:~$ pkexec chown root:root /etc/sudoers /etc/sudoers.d -R Error getting authority: Error initializing authority: Could not connect: No such file or directory     This is my /etc/sudoers file:   ubuntu@LAPTOP-D4T16P7J:~$ cat /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults        env_reset Defaults        mail_badpass Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"  # Host alias specification  # User alias specification  # Cmnd alias specification  # User privilege specification root    ALL=(ALL:ALL) ALL  # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL  # Allow members of group sudo to execute any command %sudo   ALL=(ALL:ALL) ALL  # See sudoers(5) for more information on "#include" directives:  #includedir /etc/sudoers.d     OS info:    Ubuntu WSL2.