alphabetical-sort

Sort MySQL results alphabetically, but with numbers last

淺唱寂寞╮ 提交于 2019-11-27 06:14:31
问题 Often, sorting is done with symbols sorted to the top, like 0 or * or & . This is the default way that mysql sorts; numbers and symbols and then A-Z. However, that makes the often ugliest or most badly formatted results float to the top (e.g. a result of @#$@3423 or 8 inch or &amp ). So I'd like to do a modified form of that, letters first A-Z, and then special characters last. How would I go about creating that type of sort? Something in the ORDER BY clause? 回答1: Based on a google-cached

How to retrieve list of files in directory, sorted by name

廉价感情. 提交于 2019-11-27 03:08:52
问题 I am trying to get a list of all files in a folder from C#. Easy enough: Directory.GetFiles(folder) But I need the result sorted alphabetically-reversed, as they are all numbers and I need to know the highest number in the directory . Of course I could grab them into an array/list object and then do a sort, but I was wondering if there is some filter/parameter instead? They are all named with leading zeros. Like: 00000000001.log 00000000002.log 00000000003.log 00000000004.log .. 00000463245