Glob filter format with regular expression I can view all jpg images in a folder using the function :  $list = glob('../uploads/images/*.jpg'); usort(    $list,    create_function('$b,$a', 'return filemtime($a) - filemtime($b);') ); foreach($list as $file) {     echo '&lt;img src="../uploads/images/'.basename($file).'"/&gt;';    }   How do I get regular expression in the file format? I tried to accept jpg and JPG but did not work: $list = glob('../uploads/images/*.("%.+.[jJ][pP][eE]?[gG]$%i")');
glob() - sort array of files by last modified datetime stamp I'm trying to display an array of files in order of date (last modified).  I have done this buy looping through the array and sorting it into another array, but is there an easier (more efficient) way to do this?
Why "themselves" and "himself" Can trusted users be trusted to suggest tag synonyms without a score of 5 in a tag? (on smaller sites, not Stack Overflow) This has been asked before but I feel the original question was more focussed on Stack Overflow than the Stack Exchange network at large.   Related:   Since there are now a lot of sites in the network and many of them use the tag system for categorising questions based on the title of something (for example, Arqade (Gaming), Movies &amp; TV, Sci Fi &amp; Fantasy, etc) I feel that the required knowledge of the subject matter the tag is representing is less of an issue than it perhaps is on other Stack Exchange sites.   In the below screenshot, for example, I shouldn't really have needed a score of 5 in either of the tags to perform what is essentially a cleanup process. I could of course edit all of the posts to delete one tag, so why can't I suggest it as a synonym?    This could be implemented as a per site setting so that it can only be enabled on certain sites if need be.   Can trusted users be trusted to suggest tag synonyms without a score of 5 in a tag? Where does Minecraft for Windows 10 store its data? I have searched in %appdata%, pulling up the list of files there, but there is no file labelled .minecraft. Searching %appdata%\.minecraft returns "no results found".   I also opened Minecraft to click on the resources button and could not locate that either. Windows Explorer sort method I'm looking for an algorithm that sorts strings similar to the way files (and folders) are sorted in Windows Explorer. It seems that numeric values in strings are taken into account when sorted which results in something like  name 1, name 2, name 10   instead of  name 1, name 10, name 2   which you get with a regular string comparison.  I was about to start writing this myself but wanted to check if anyone had done this before and was willing to share some code or insights. The way I would approach this would be to add leading zeros to the numeric values in the name before comparing them. This would result in something like  name 00001, name 00010, name 00002   which when sorted with a regular string sort would give me the correct result.  Any ideas? Block specific URL on web browsers I want to block certain URLs on browsers. I don't want to block whole site. For example, I want to block , but not whole  domain. Is there any way I can do it? Why shouldn't I prefix my fields? I've never been a fan of Hungarian notation, I've always found it pretty useless unless you're doing some really low level programming, but in every C++ project I've worked on some kind of Hungarian notation policy was enforced, and with it the use of some 'not-really-Hungarian' prefixes as m_ for fields, s_ for statics, g_ for globals and so on.  Soon I realized how much useless it was in C# and gradually started to drop all of my old habits... but the 'm_' thing. I still use the m_ prefix on private fields because I really find it very useful to being able to distinguish between parameters, locals and fields.  The  says I shouldn't, but it does not say why (the way e.g. Google's conventions generally tend to rationalize their prescriptions).  Are there reasons why I shouldn't or is it only a matter of style. If it is the latter, are prefixes generally considered a bad style and can I expect negative reactions from other people working on the codebase? Expected value of a non-negative random variable So I installed vlc daily built snap package. It's working great, no problems there. However I noticed that after upgrade the system has 2 versions of vlc (7 and 9). That can be seen when browsing /snap/vlc/ directory and using system monitor. This is also the case with other snaps. Is there a way to automatically delete older versions of snaps? Or do I just delete them using plain &quot;rm&quot; command? Is it safe to delete them that way? Are there surface-mount pin header footprints for KiCAD? Why is it that when you add normally distributed random variables the variance gets larger but in the Central Limit Theorem it gets smaller? Objects with transparent texture not always show transparency in 3dview For some reason objects don't show their transparency all the time.  In this image the circles in red are suposed to be transparent like the ones in green.    When I select the object in the back, all objects in front of it become opaque.    When I select the two objects that are opaque, then they become transparent as they sould be.    The display is in GLSL mode  These are the material and texture properties      I'm not worried about the final render, just the editing view. I would like to see the actual transparency at editing time only, because the scene is to be imported in a third party game engine.  Blender is v2.68   is the blend file I was going through the fundamental theorem in Number Theory where any non zero integer n can be represented as a product of distinct primes. A related problem with this theorem is to prove that for every such number, there exists a prime $p$ such that $p&lt; \sqrt n$. I was wondering if there is any mathematical proof that no prime $p$ exists for the number $n$ such that $p&gt; \sqrt n$. The "New Contributor" dialog is masked The New Contributor dialog is masked from where the comment section ends. Here are some screenshots just to be more clear: With no comments:    With one comment:    No masking with more comments: Phase shift of 180 degrees of transversal wave on reflection from denser medium Can anyone please provide an intuitive explanation of why phase shift of 180 degrees occurs in the Electric Field of a EM wave, when reflected from an optically denser medium?  I tried searching for it but everywhere the result is just used.The reason behind it is never specified. A lot of people recommend to use the maximum node for glass setup, but I can't find that node. Nothing comes up when I search for it.  Where do I find it? Luggage, connecting flights and customs question for USA I'm flying to the USA, from Australia, through LAX and catching a connecting flight 6 hours later, think it's the same ticket, booked all at once. I've never traveled before, and I'm wondering what happens with customs.   Do I collect my bags at LAX so they can be checked? Do I have to check in at every airport or is it all done when I catch the first flight? There are 4 flights on my itinerary. t-test for partially paired and partially unpaired data Add source to figure caption How can I add a source to a figure? I need to add \ref, \cite or just free text. Something like that: \begin{figure} [ht]   \centering   \includegraphics[width=0.95\textwidth]{res/figure.pdf}     \caption{Caption}     \source{\ref{},\cite{} or free Text}   \label{fig:gliederung} \end{figure}  Should give me:  The source shouldn't appear in \listoffigures. Is there a list of Windows special directories/shortcuts (like %TEMP%)? I'm looking for a reference list of shortcuts like %TEMP%.  When I'm using Windows+R or Windows Explorer and type %temp%, the Windows Explorer takes me to the Temp directory. Are there more of these shortcuts?  UPDATE: . Reference to undeclared entity exception while working with XML I am trying to set the innerxml of a xmldoc but get the exception: Reference to undeclared entity  XmlDocument xmldoc = new XmlDocument(); string text = "Hello, I am text &amp;alpha; &amp;nbsp; &amp;ndash; &amp;mdash;" xmldoc.InnerXml = "&lt;p&gt;" + text + "&lt;/p&gt;";   This throws the exception:      Reference to undeclared entity 'alpha'. Line 2, position 2..    How would I go about solving this problem?