Wednesday, 26 June 2019

Is there a way to fix the sort by name in Windows 10 File Explorer?

There seems to be a bug in Windows 10 File explorer.


For instance here are four files I created listed how they appear when I have sort by Name ascending selected:


31A.txt
32A.txt
311.txt
321.txt

These are not correctly sorted by name ascending. The proper sort would be:


311.txt
31A.txt
321.txt
32A.txt

This bug appears whenever the filenames start with the same character. In other words, File Explorer will place a file that starts with '1' before one that starts with 'A'.


This only happens in File Explorer and open dialog boxes that I'm aware of. Command line lists the files in the proper order.


Is there a fix for this? Am I off my rocker? Googling is coming up zilch for me. This also seems like a very strange bug, sorting algorithms have been around for ages now.

how to find and delete multiple files in bash/linux


I have directories with sub directories containing .srt files. I need to go through the directories and delete them all. I know how to find them like so:


find ./directory -name *.srt

but I'm not sure how to pipe them to rm.



Answer



The syntax is a little bit tricky:



find ./directory -name "*.srt" -exec rm {} \;

Windows Update fails with code 80244019


I just found that Windows Update is failing and hasn't installed any updates for a little more than a month.


It says:


Windows could not search for new updates
There was a problem searching for updates
Errors found: Code 80244019

This article at Microsoft suggests it might be a virus: Windows Update error 80070422, 80244019, or 8DDD0018


The operating system is Windows 8.1 Pro with Media Center.



Answer



I've found an online discussion that suggests that this has been happening because of increased load of Windows 10 distribution.


What worked for me was disabling "Give me updates for other Microsoft products when I update Windows".


Microsoft Windows ISO checksums


Is there an official source for Windows ISO (XP+) checksums, online?


Wanting to download some older Windows versions, for support purposes, but they don't appear to be available on Microsoft's website, so I am having to find 3rd party copies.



Answer



An MSDN subscription is not needed to browse the contents on the Subscriber Downloads page.


Once there, you can browse to any product and click on the Details link to see the SHA1 hash for the product


for ex.: Windows XP Service Pack 3 (x86) - CD (English)



Windows XP Service Pack 3 (x86) - CD (English)
SHA1: 8fa76ccea145d050fc6a506ffbdedfe53282e5b4



linux - Start multiple instances of Firefox


How can I have multiple independent instances of Mozilla Firefox 3.5 on the same X server, but started from different user accounts (consequently, different profiles)?


Limited success was only with Xephyr :1, DISPLAY=:1 /usr/local/bin/firefox, but Xephyr has no Cygwin/X's "rootless" mode so it's not comfortable (see other question).


The idea is to have one Firefox instance for various "Serious Business" things and the other for regular browsing with dozens of add-ons securely isolated.



Answer



In fact, you don't even need multiple user accounts to accomplish this. You can execute several Firefox instances inside the same user account using the no-remote argument. The command line arguments are documented at http://kb.mozillazine.org/Command_line_arguments


Windows x86 physical memory is 24-bit?

I am reading the new book, Windows Internals 5 about memory management (chapter 9 in Physical Address Extension PAE section). It is mentioned "A 32-bit system represents physical addresses internally with 24 bits" on page 770. I am totally confused, and I think x86 physical memory should be also addressed by 32-bit, and it is why the system is called 32-bit system.


Any ideas what is wrong?

linux - Using Ghostscript to convert multi-page PDF into single JPG?


I know Ghostscript can convert PDFs to JPGs, and in the case of a multi-page PDF, can rip each page to an individual JPG. But is it possible to have it rip them to one JPG, so that the pages are pasted below each other, e.g. the top half of the JPG is page 1, the bottom half is page 2? Or do I have to use another program (and can ImageMagick do this?) to combine the JPG pages into one image?



Answer



Yes, you'll have to convert each PDF page into a single JPG file (Ghostscript can do that).


Then stitch together the resulting JPG files using another program (ImageMagick or GraphicsMagic can do that using their montage sub-commands).


I'm not aware of any software which can do that in one go.


PDF-to-JPG conversion (with Ghostscript): You'll want to make sure that you get the best possible result. So make sure you tweak the commandline options so they work for you. I'd start with this:


gswin32c.exe ^
-dBATCH ^
-dNOPAUSE ^
-dSAFER ^
-sDEVICE=jpeg ^
-dJPEGQ=95 ^
-r600x600 ^
-sOutputFile=c:/path/to/jpeg-dir/pdffile-%03d.jpeg ^
c:/path/to/pdffile.pdf

This will create JPGs called pdffile-001.jpeg, pdffile-002.jpg etc. The parameter *-dJPEGQ=95" sets "JPEG Quality" to 95%. It uses a resolution of "600x600 dpi". You may need to additionally control the pagesize of the resulting JPGs in case your Ghostscript's default doesn't fit your needs:


gswin32c.exe ^
-dBATCH ^
-dNOPAUSE ^
-dSAFER ^
-sDEVICE=jpeg ^
-dJPEGQ=95 ^
-r600x600 ^
-dPDFFitPage ^
-dFIXEDMEDIA ^
-dDEVICEWIDTHPOINTS=800 ^
-dDEVICEHEIGHTPOINTS=600 ^
-sOutputFile=c:/path/to/jpeg-dir/pdffile-%03d.jpeg ^
c:/path/to/pdffile.pdf

or


gswin32c.exe ^
-dBATCH ^
-dNOPAUSE ^
-dSAFER ^
-sDEVICE=jpeg ^
-dJPEGQ=95 ^
-r600x600 ^
-dPDFFitPage ^
-dFIXEDMEDIA ^
-sDEFAULTPAPERSIZE=a4 ^
-sOutputFile=c:/path/to/jpeg-dir/pdffile-%03d.jpeg ^
c:/path/to/pdffile.pdf

multiple-to-single-JPG-stitching with montage (ImageMagick or GraphicsMagick): The montage command (used in this example is ImageMagick) allows you to control the tiling pattern. If you use e.g. -tile 4x3 you'd get this imposition layout:


1  2  3  4    
5 6 7 8
9 10 11 12

You could use this command to stitch together 12 individual JPGs into one:


montage ^
-border 0 ^
-tile 4x3 ^
c:/path/to/jpeg-dir/pdffile-*.jpeg ^
c:/path/to/final.jpg

Of course, montage has many dozen of additional parameters which allow you to determine background, spacing, offsets, decoration, labels, rotation, cropping, caption etc. for the input and the resulting JPG.




EDIT: (I had wanted to give this hint already in my original answer, but forgot.) montage by default will use tile sizes of 120x120 pixels. If you want to keep the original page sizes for each tile, you have to add -geometry to the commandline. Assuming you had A4 (=595x852 pt) pages in your PDF, and you want to keep this, but also add a spacing of 11pt to the horizontal and 22 pt to the vertical direction of the tiling (plus 4pt strong gray border/frame lines around each tile), do this:


montage ^
-border 4 ^
-tile 4x3 ^
-geometry 595x842+11+22 ^
c:/path/to/jpeg-dir/pdffile-*.jpeg ^
c:/path/to/final.jpg



EDIT 2: (Missed still another important hint.) If you do not want to lose the good image quality during the stitching/montage process, which your PDF-to-JPG conversion had created, then also add the -quality 100 parameter to your commandline like this:


montage ^
-border 4 ^
-tile 4x3 ^
-geometry 595x842+11+22 ^
-quality 100 ^
c:/path/to/jpeg-dir/pdffile-*.jpeg ^
c:/path/to/final.jpg

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...