Wednesday, March 28, 2018

How to create a unlabeled ghost drive share in Windows 10+

Firstly, you have to have access to a VM or LINUX machine to create a share in Samba (I was using Samba 4.2.6 for reference running on Centos 7 Hyper-V VM).  The addressable UNC share in the following format \\severname\sharename for Windows. 

The trick and bug in Windows Explorer is the share is on the upper boundary length of 255 characters for \\severname\sharename name

This example share has a length of 254 characters.

\\aaabbbcccdddeeefff\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

So with that you can map the drive from cmd line using "NET USE" cmd below and use Map Network Drive in Windows Explorer to map drive J: to above path.

net use J:  \\aaabbbcccdddeeefff\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

So the results is the ghost drive mapping share
Note: H:\ is longer than BIOS Servername limit of 15 characters and works.



Tuesday, March 27, 2018

Windows Explorer Bug - Properties shows Incorrect/Wrong File And Folder Counts

Yours truly has found a Windows Explorer bug starting from Windows XP (2001) and continue to this day in Windows 10. It involves one of the most basic and fundamental apps to Windows and that is Windows Explorer. This is still is an issue for the latest build of Microsoft Windows 10 Pro 1803 (10.0.17134.112).

There's another bug I found more recently, in regards to counts when path is too long.


Here's the bug, basically when you want to get the total file and folder counts for a specific sub-directory, the counts are incorrect. Essentially, 

When opening Windows Explorer Properties for a folder that contains directory symbolic links or re-parse points, but the count does not include directory symbolic links re-parse points. 

In the Window Explorer pop-up Properties windows, the directory symbolic links and re-parse points are simply not enumerated. The incorrect result is seen in image 1 below.

In Image 1, we are using "testshort" directory as our showcase test directory. In the Window Explorer pop-up Properties window; 
  • we have summary: Contains 7 Files, 4 Folders for total of 11 (which is incorrect)
This contradicts the main windows details pane where for directory "testshort" we have following details; 

  • 10 Directories - counting the number of items with Type column having "File Folder" 
  • 7 Files - in Type column we have  (File, Shortcut, Text Document and .symlink) categories
Moreover, if you examine lower left-hand corner we have a total of 15 items, not 17 in total. Lots of errors found here. 


Image 1: Pop-up 7 Files , 4 Folders = 11 total (incorrect), 15 Items in main window (also incorrect)
This contradicts findings using DOS. Doing a 'dir' cmd, directory symbolic links and re-parse points are considered directories. 

For a corroborating viewpoint, in DOS we have the correct enumeration for the same directory;
  1. 10 Directories (10 less 2 ('.' and '..') = 7 dirs  
  2. 7 Files 
Image 2 : 17 Files - 10 Directories and 7 Files, correct




















April 10, 2018 Update - Using the recently Microsoft has open sourced Windows File Manager (WinFile) code which was last delivered in  Windows ME (2000), release on Github. You can download a compiled WinFile.exe, which I used below to run on Windows 10. 

WinFile identifies directory symbolic links but not re-parse points (junctions). Junctions are not enumerated at all. 

Img 3 : 13 Files - 6 Directories and 7 Files






Sunday, March 25, 2018

Visual Studio Code No1 Notepad Plus Plus Popularity Ranking and Easter Egg

According to Stack Overflow, 

  1. Visual Studio Code earned top spot in 2018  and free 
  2. Open source and free Notepad++ is 3rd most popular editor

From https://insights.stackoverflow.com/survey/2018/#development-environments-and-tools

Visual Studio Code
  • 34.9%
Visual Studio
  • 34.3%
Notepad++
  • 34.2%
Sublime Text
  • 28.9%
Vim
  • 25.8%
IntelliJ
  • 24.9%
Android Studio
  • 19.3%
Eclipse
  • 18.9%
Atom
  • 18.0%
PyCharm
  • 12.0%
Xcode
  • 10.6%
PHPStorm
  • 9.0%
NetBeans
  • 8.2%
IPython / Jupyter
  • 7.4%
Emacs
  • 4.1%
RStudio
  • 3.3%
RubyMine
  • 1.6%
TextMate
  • 1.1%
Coda
  • 0.6%
Komodo
  • 0.6%
Zend
  • 0.4%
Light Table
  • 0.2%

I noticed some missing editors; 

                                             UltraEdit ? 
                                              Textpad ?
                                              Notetab ?
 






Notepad++ Easter Egg

Type "Space Invaders", select it, then hit F1.



Tuesday, March 6, 2018

Text Web Browser for Windows 10 - Surf the web in text only

Update 2020: Get https://metadataconsulting.blogspot.com/2020/04/How-to-get-a-Text-Browser-for-Windows-7-10-Surf-the-web-in-text-only-no-ads.html - Installation has been simplified. Below is out of date.

Get a working Text Browser for Windows 10 +:

  • Emacs is a well know editor that comes with little know built-in browser 
  • Emacs is superbly supported on all platforms, a staple on UNIX

The Emacs Web Browser (Eww) is a very basic and fast text/image browser. Flash and Javascript are not supported which gets rid of ads. 

  • A note about Lynx browser, tried install but could not get it to work. 

Emacs Web Browser surfing http://www.google.ca/
Source:

Get latest version GNU EMACS 26.0.90 for Windows

http://alpha.gnu.org/gnu/emacs/pretest/windows/

How to get EMACS Web Browser to work



  1. Unzip emacs-26.0.90-x86_64-with-deps.zip - Depends library
  2. Unzip emacs-26.0.90-x86_64.zip - Compiled Emacs editor with browser
  3. Copy Compiled(2) sub-directories to Depends(1) sub-directories;
        bin -> bin
        lib -> lib
        libexe -> libexe
        share -> share - you can say NO to copy overwriting info and man directories.
  4. Run EMACS by clicking runemacs.exe in Depends bin directory

  5. In EMACS, choose Tools -> Browse the Web -> Enter your URL or Keywords:



        
  6. Voila! it works!


Tips:

  1. EWW, the Emacs Web Wowser, is a web browser package for Emacs.
  2. Download is huge at 716Mb combined, but running takes a scant 45 Mb of RAM. Unlike Google Chrome taking now a whopping 1.2Gb of RAM now !
  3. If you just use emacs-26.0.90-x86_64.zip it will complain about not loading LIBXML2.dll.
  4. You can download that here http://xmlsoft.org/sources/win32/, but then complains about gnutls not being installed, then we are into dependency hell. Hours later....

Monday, March 5, 2018

C# .NET How many bytes or number of files on disk or disk / hard drive size can a List<T> hold?



Assuming, that the average size of an office document is 321 kB in 2012 (we need an update please). 


1 million documents consume about 306 GB, or 2.98 TB for 10 million document.

The upper bound to List<T> has maximum upper bound of in Char.Int32 items  or  2,147,483,647 (2 billion items).


Therefore, a hypothetical 657.129995982 Terra-byte hard-drive holding office documents can approximately be enumerated into a List<T>.