Shane Ray – Invisible Character Visualizer

Background

In this post, we will use Shane Ray’s Invisible Character Visualizer to view non-printable Unicode characters.

Artifacts

As our content contains un-printable characters, it is easier to avail the contents in a file that is easily share-able.

GitHub

As always here we will go with GitHub.

The small sample file is available here :-

unicodeSampleFiles/sql/dbo.customer.sql
Link

 

Text

Here is the text we will be working with :


USE [tempdb]
GO

/****** Object:  Table [dbo].[customer‬]    Script Date: 6/19/2019 8:52:08 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

Usage

Shane Ray

Invisible Character Visualizer

Visual Studio – Visual Studio Community Edition 2017

Launched Visual Studio 2017 Community Edition.

Original View

Here is the original view in Visual Studio
usage.01.20190622.0857AM

 

Outline

Let us install and use the Visual Studio Extension :-

  1. Access Visual Studio Gallery
  2. Install
    • Choose the Visual Studio Installs to target
  3. Launch Visual Studio
  4. Load Files

Access Visual Studio Gallery

artifact.20190622.0901AM.PNG

Install

Install downloaded Visual Studio Extension

It is easy enough to launch it just like any other application.

Screen Shots
Invisible Character Visualizer – Install

install.20190622.0534AM.PNG

Invisible Character Visualizer – Installing

installing.01.20190622.0535AM.PNG

Invisible Character Visualizer – Install Complete

install.Complete.01.20190622.0535AM.PNG

File View – Post Install
Image

usage.02.20190622.0914AM.PNG

Extension

We can quickly see the invisible character (0x202C).

Referenced Work

  1. Visual Code Issues
    • noraj
      • Display invisible character #58252
        • Profile :- noraj opened this issue on Sep 8, 2018
          Link
    • Juan Potato
      • View invisible characters #31291
        • Profile :- JuanPotato opened this issue on Jul 23, 2017
          Link

 

Dedicated

We can clearly see that Shane Ray’s Visual Studio Extension, Invisible Character Visualizer, is very capable.

 

SoSci Survey GmbH – View Chars

Background

Need to view non-printable Unicode characters.

Tools

Outline

Here are some tools for viewing non-printable Unicode characters :-

  • SoSci Survey GmbH • Munich • Germany

Usage

SoSci Survey GmbH • Munich • Germany

Entered the text pasted below :-


USE [tempdb]
GO

/****** Object:  Table [dbo].[customer‬]    Script Date: 6/19/2019 8:52:08 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

Received back :-

soscisurvey.de.20190622.0821AM

From the original text, it does not appear that we have non-printable character sets, but plain sight view aside, SoSci Survey GmbH displays all characters.

 

Artifacts

The small sample file is available here :-

unicodeSampleFiles/sql/dbo.customer.sql
Link

Pastor Paul LeBoutillier :- Priscilla, Aquila, Apollo, and Paul

Background

Pastor Paul LeBoutillier delivers a power sermon on how the church needs worker such as Priscilla, Aquila, Apollo, and Paul.

Scripture

Acts 18:24-27

Link

Meanwhile a Jew named Apollos, a native of Alexandria, came to Ephesus. He was a learned man, with a thorough knowledge of the Scriptures.

He had been instructed in the way of the Lord, and he spoke with great fervor and taught about Jesus accurately, though he knew only the baptism of John.

He began to speak boldly in the synagogue. When Priscilla and Aquila heard him, they invited him to their home and explained to him the way of God more adequately.

When Apollos wanted to go to Achaia ( Corinth ), the brothers and sisters encouraged him and wrote to the disciples there to welcome him. When he arrived, he was a great help to those who by grace had believed.

Acts 19:1-7

Link

While Apollos was at Corinth, Paul took the road through the interior and arrived at Ephesus. There he found some disciples

and asked them, “Did you receive the Holy Spirit when you believed?” They answered, “No, we have not even heard that there is a Holy Spirit.”

So Paul asked, “Then what baptism did you receive?” “John’s baptism,” they replied

Paul said, “John’s baptism was a baptism of repentance. He told the people to believe in the one coming after him, that is, in Jesus.

On hearing this, they were baptized in the name of the Lord Jesus.

When Paul placed his hands on them, the Holy Spirit came on them, and they spoke in tongues and prophesied.

There were about twelve men in all.

Videos

  1. Calvary Chapel Ontario
    • Acts 18 – The Gifts of Apollos
      • Video #1
        Channel :- Calvary Chapel Ontario
        Published On :- 2015-March-1st
        Link
    • Acts 19 – Part 1 The Power of the Holy Spirit
      • Video #1
        Channel :- Calvary Chapel Ontario
        Published On :- 2015-March-8th
        Link

 

Smart System Menu

Background

Have an application that is not allowing me to resize it’s window.

Sought out tools to help.

Smart System Menu

The most accessible tool I found is the one from Alexander.

The tool’s name is Smart System Menu.

Artifact

The compiled app is here.

artifact.package.20190621

It is open source and it is available here.

 

Download

Downloaded the compiled binary.

Extract

The binary is compressed.

Please un-compress.

artifact.package.extract.20190621.0541PM

Execute

Please execute SmartSystemMenu.exe.

Once started, it runs in the background and accessible via the System Tray.

Usage

The system menu in each application is enhanced.

The enhancements is that we now have :-

  1. Resize Menu Entry
    • Specific Sizes
      • 640×480
      • 800×600
    • Manual
  2. Alignment

Images

Microsoft Windows – Word pad

usage.wordpad.01.20190621.0545PM.PNG

Summary

If you end up with an Application that is not easy to move around on the desktop, please consider Windows Screen sizing tools.

Unfortunately, it did not help with our targeted application.

The developer had chosen to not allow the window to be resized.

sp_describe_undeclared_parameters and temp tables

Background

As a very quick follow-up to our last post, let us untie sp_describe_undeclared_parameters from Tableau.

SQL

Temporary Table

Code


use [tempdb]
go

set nocount on
go

set xact_abort on
go

declare @sql nvarchar(4000);

declare @CHAR_TAB char(1)

set @CHAR_TAB = char(9);

begin tran

    create table #sam
    (
        [id] bigint not null
            identity(1,1)
    )

    set @sql = N'select * from #sam '
                + ' where [id] = @P1'

    begin try

            print 'running sql '
            print '------------'
            print @sql

            print ''; print '';

            exec sp_describe_undeclared_parameters
                    @tsql = @sql           

        end try
        begin catch

           print 'Exception'
           print '========='

           print @CHAR_TAB
                    + 'ERROR_NUMBER() :- '
                    + cast
                       (ERROR_NUMBER()
                            as varchar(10)
                       )

           print @CHAR_TAB
                    + 'ERROR_MESSAGE() :- '
                    + ERROR_MESSAGE()

            print ''; print '';

        end catch

while (@@TRANCOUNT > 0)
begin

    rollback tran;

end

Output

Output – Image

temporaryTable.output.20190621.0910AM.PNG

Output – Textual


running sql
------------
select * from #sam  where [id] = @P1

Exception
=========
	ERROR_NUMBER() :- 208
	ERROR_MESSAGE() :- Invalid object name '#sam'.

Global Temporary Table

Code


use [tempdb]
go

set nocount on
go

set xact_abort on
go

declare @sql nvarchar(4000);

declare @CHAR_TAB char(1)

set @CHAR_TAB = char(9);

begin tran

    if object_id('##sam') is not null
    begin

        drop table ##sam

    end

    create table ##sam
    (
        [id] bigint not null
            identity(1,1)
    )

    set @sql = N'select * from ##sam '
                + ' where [id] = @P1'

    begin try

            print 'running sql '
            print '------------'
            print @sql

            print ''; print '';

            exec sp_describe_undeclared_parameters
                    @tsql = @sql           

        end try
        begin catch

           print 'Exception'
           print '========='

           print @CHAR_TAB
                    + 'ERROR_NUMBER() :- '
                    + cast
                       (ERROR_NUMBER()
                            as varchar(10)
                       )

           print @CHAR_TAB
                    + 'ERROR_MESSAGE() :- '
                    + ERROR_MESSAGE()

            print ''; print '';

        end catch

        if object_id('##sam') is not null
        begin

            drop table ##sam

        end

while (@@TRANCOUNT > 0)
begin

    rollback tran;

end

Output

Output – Image

temporaryTable.output.20190621.0910AM.PNG

Output – Textual


running sql
------------
select * from ##sam  where [id] = @P1

Output – Grid

globalTemporaryTable.output.20190621.0923AM

Source Code Control

GitHub

sp_describe_undeclared_parameters/TempTables
Link

Summary

It is provable that sp_describe_undeclared_parameters does not play well with temporary tables.

Yet, it does OK with global temporary tables.

 

Tableau – Error – “Invalid object name ‘#Tableau_8_2_Connect_CheckCreateTempTableCap’.”

Background

Playing around with Tableau and noticed an error recorded on our Microsoft SQL Server Database.

Error

Error Text


 Invalid object name '#Tableau_8_2_Connect_CheckCreateTempTableCap'.

Troubleshooting

SQL

Here is a modified version of the offending code :-


CREATE TABLE [#Tableau_8_2_Connect_CheckCreateTempTableCap] 

([COL] INTEGER

)

SELECT *

FROM [#Tableau_8_2_Connect_CheckCreateTempTableCap]

exec sp_describe_undeclared_parameters
N'INSERT INTO [#Tableau_8_2_Connect_CheckCreateTempTableCap] ([COL])
VALUES (@P1)'

Remediation

Outline

The issue is that sp_describe_undeclared_parameters does not work well with temporary tables.

Things work well when an actual table is used.

Please keep in that the pound sign # in the table name, [#Tableau_8_2_Connect_CheckCreateTempTableCap], means that the table is a temporarily table and it is created in temporary database, tempdb.

SQL


if object_id('[Tableau_8_2_Connect_CheckCreateTempTableCap]') is not null
begin

    drop table [Tableau_8_2_Connect_CheckCreateTempTableCap]

end

CREATE TABLE [Tableau_8_2_Connect_CheckCreateTempTableCap] (
	    [COL] INTEGER
)

SELECT *

FROM [Tableau_8_2_Connect_CheckCreateTempTableCap]

exec sp_describe_undeclared_parameters
          N'INSERT INTO [Tableau_8_2_Connect_CheckCreateTempTableCap] ([COL])
            VALUES (@P1)'

if object_id('[Tableau_8_2_Connect_CheckCreateTempTableCap]') is not null
begin

    drop table [Tableau_8_2_Connect_CheckCreateTempTableCap]

end

Output

parameters

Free data Sets – 2019/June

Background

Wanted to create a page for listing publicly available free & commercial datasets.

Listing

  1. SimpleMaps
    • World Cities Database
      • Profile
        • We’re proud to offer a simple, accurate and up-to-date database of the world’s cities and towns. We’ve built it from the ground up using authoritative sources such as the NGIA, US Geological Survey, US Census Bureau, and NASA.
        • Our database is:
            • Up-to-date: It was last refreshed in April of 2019.
            • Comprehensive: Over 4 million unique cities and towns from every country in the world.
            • Accurate: Cleaned and aggregated from official sources. Includes latitude and longitude coordinates.
            • Simple: A single CSV file, concise field names, only one entry per city.

           

      • Cost :- Free & Commercial
      • Web Link
        Link
    • United States Cities Database
      • Profile
        • Up-to-date: It was last refreshed in March of 2019.
        • Comprehensive: Over 37,000 cities and towns from all 50 states, DC, Puerto Rico and the US Virgin Islands.
        • Accurate: Cleaned and aggregated from official, public-domain sources.
        • Simple: A single CSV file, concise field names, only one entry per city.
      • Cost :- Free & Commercial
      • Web Link
        Link
  2. data.world
    • New York
      • Bicycle Counts for East River Bridges
        Link