Wednesday, March 4, 2020

What is lxml?

lxml is a parser for XML and HTML. It binds c libraries linxml2 and licxslt to Python and should work with Python versions 2.8 through 3.8.

lxml is better than ElementTree I used with python 3.7:

https://hodentek.blogspot.com/2018/07/parsing-xml-with-python-37.html

You can download the complete and this te documentation in pdf from here:
https://lxml.de/lxmldoc-4.5.0.pdf

The HTML parsing may be available here:
https://lxml.de/index.html#download

As a parser, it builds a data structure (parse tree) given the XML. There are many programs to parse XML but this is python specific.

How do you install?

Get the lxml from here:

http://pypi.python.org/pypi/lxml/ 

 use the following public key:

https://lxml.de/3.8/pubkey.asc 

If you have Python 3.8, like I have, the lxml 3.8.0 is here:

https://lxml.de/files/lxml-3.8.0.tgz
Documentation here:
https://lxml.de/3.8/lxmldoc-3.8.0.pdf

If you are using Windows 10 and already have Python 3.8 use the following steps:


Step 1: Verify you can run 'pip' as shown here:
-------
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>pip

Usage:
  C:\Users\Owner\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe -m pip [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to
                              WARNING, ERROR, and CRITICAL logging levels).
  --log                 Path to a verbose appending log.
  --proxy              Specify a proxy in the form [user:passwd@]proxy.server:port.
  --retries          Maximum number of retries each connection should attempt (default 5 times).
  --timeout              Set the socket timeout (default 15 seconds).
  --exists-action     Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
                              (a)bort.
  --trusted-host    Mark this host as trusted, even though it does not have valid or any HTTPS.
  --cert                Path to alternate CA bundle.
  --client-cert         Path to SSL client certificate, a single file containing the private key and the
                              certificate in PEM format.
  --cache-dir
           Store the cache data in .
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for
                              download. Implied with --no-index.
  --no-color                  Suppress colored output
---------------------

Step 2: Use this command to install lxml:





Tuesday, February 4, 2020

How do you correct Window's 10 display problem ( displaying bands in the desktop)?

The bands on Desktop's display appear as shown.



Normally, the desktop is just solid blue.

This fix which came in Windows Central in July 2019 still works.
https://www.windowscentral.com/how-fix-vertical-stripes-color-issue-affecting-displays-windows-10-may-2019-update

Steps for correction:

Windows Task Scheduler--> Microsoft-->Windows-->WindowsColorSystem-->

CalibrationLoader

Properties of CalibrationLoader



Click Triggers.



Disable both At log on and On connection to user session using the Edit...button as shown for one of them.

Restart Windows and there should not be any bands in the display.

Is your desktop display banded?

Here are some snapshots of my laptop display:





Looks crazy right. Microsoft modified their IE to the 'new Edge'. They should do something to the Windows and Outlook (free).

Friday, January 24, 2020

How do you install SQL Server Management Studio (SSMS) v 18.4?

Since SQL Server 2016, SQL Server Management is not installed when you install SQL Server. It will be a separate install.

You can download the latest SQL Server Management Studio v18.4 (the most recent version) from here:
https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15



It is backward compatible with the earlier versions.

Double click the downloaded file (SQL2019-SSEI-Dev.exe) to begin the installation.


 Click Install. It takes a little while and gets installed easily.


 You should see this in your Windows Display of programs.


These programs get added to your Control Panel.

When you launch the SQL Server Management Studio you may get this display. Since there was an existing SSMS v 17.x was present, this display came up. 


The user settings from v17 were imported. You could also import later after a default installation.


The SQL Server Management Studio opens displaying the Object Browser. It assumes Windows Authentication with the current user as server administrator.

The version information is as seen in the following screen:



Friday, January 17, 2020

What is the PowerShell cmdlet version that works with (compatible) SQL Server 2019?

PowerShell is in continuous development mode. New challenges require updating of software to accommodate the changes. This is the nature of such things. PowerShell cmdlets also follow this natural course and we have many versions.

I had an older version, and when I tried to launch contextually from SSMS v 8.4, I got this response:


In order to get the version you want, you may access this link:


Here is a list from the above site:






What happened to the Query Debugger icon in SQL Server Management Studio v 18.4?

It looks like it has been deprecated in SSMS 18. I have SSMS v 18.4 installed and the icon is missing. Also missing is the Execute with Debugger drop-down menu in the query pane context.

Debug icon present in 2012 and 2017 SSMS. Missing in v18.4 in the 2019 version.


Missing in the Query drop-down menu. It should have been present below 'Execute'.