Tue, Nov 28, 2017 11:19 pm
Find entries in one table but not a second table in a database
I have an SQLite
database stored on my MacBook Pro laptop that I use to track work requests. The
database file is named CRQ.db
, since it tracks work done under
a Change Request (CRQ). Within that database are several
tables
two of which are "Equipment" and "Device". For every CRQ that I need to
deal with, I store records with the CRQ number in a "CRQ"
column and an identifier for each piece of equipment affected by work done
under that CRQ in a "Device" column. information on equipment that is affected
by the CRQ in the Equipment table. I have another table named "Device" that
holds details for each device, including the manufacturer and model number as
well as the physical location of the device. The information in the
"Description" column in the "Device" table matches the "Device" name in
the "Equipment" table. The two tables have the following structure:
Equipment
Name | Type |
CRQ | Text |
Device | Text |
Project | Text |
Notes | Text |
Device
Name | Type |
Description | Text Unique |
Manufacturer | Text |
Model | Text |
Site | Text |
Building | Text |
Room | Text |
Notes | Text |
Equipment.Device = Device.Description
[ More Info ]
[/software/database/sql]
permanent link
Tue, Nov 21, 2017 11:40 pm
Changing a MI424WR-GEN2 Router from WEP to WPA2 for Wi-Fi
Someone reported to me that when she attempted to connect to the WiFi service
at her office that she received the message below on her phone:
Weak Security
WEP is not considered secure.
If this is your Wi-Fi network, configure the router to use WPA2 Personal
(AES) security type.
When I checked the Verizon-provided router providing the wireless service
at her office, I found it was an ActionTec MI424WR-GEN2 router. To change
the wireless security on that router from
WEP to
WPA2 take
the following steps.
-
Log into the router and, from the main menu, click on Wireless Settings.
-
Click on Advanced Security Settings.
-
From the Advanced Security Settings menu, select WPA2
(An enhanced version of WPA providing stronger security settings.
-
At the WPA2 window, type a key, which is akin to a password, in the
Pre-Shared Key field and click on the Apply button.
-
When you click on Wireles Settings again from the top menu bar,
you should then see the key you provided in the WPA2 line.
[ More Info ]
[/network/routers/actiontec/MI424WR]
permanent link
Mon, Nov 20, 2017 10:22 pm
EMF image embedded in a PowerPoint file on OS X
Someone sent me a
Microsoft PowerPoint presentation to review. The file
I received was a .pptx file which I opened using the PowerPoint application
in
Microsoft Office 2016 for Mac on my
MacBook Pro
laptop running
OS X El Capitan (10.11.6). When I viewed the presentation, I noticed one
of the slides was blank. I sometimes receive Microsoft Excel workbooks which
contain a worksheet that should normally contain network diagrams where the
diagrams don't appear when viewed on my Mac laptop, but do appear when I open
the file in Microsoft Excel on a system running the Microsoft Windows operating
system. In such cases, I've found that since the .xlsx or .xlsm
file
format is just an
XML-based container format akin to a
zip file, I
rename the files where the problem occurs to have a .zip rather
than .xlsx or .xlsm extension, which then allows me to extract the
files contained within the file - see
Zipping and unzipping Excel
xlsx files and
Extracting
embedded documents from an Excel .xlsm file. Then I use the OS X
file command
in a
Terminal window to examine the .bin files in the xl/embeddings
subdirectory that is produced when I extract the files and folders
from the zip file. That utility tells me which of the .bin files
represent embedded
Microsoft Visio or PowerPoint files, so I can then give
the Visio ones a .vsd extension rather than a .bin extension. I can
then view the diagrams with the free
VSD Viewer Pro application
I have on the Mac. Since there are usually several .bin files in the directory,
I created
a Python script
to determine the file type for all of the files in a directory at once.
[ More Info ]
[/software/office/powerpoint]
permanent link
Fri, Nov 17, 2017 9:25 pm
Removing all lines containing a string in vi
To remove all lines containing a particular
string in the vi or
Vim
text editors, you can use the g
command to globally search for the
specified string and then, by putting a "d" at the end of the command line,
specify that you want all lines containing the specified string deleted. E.g.,
If I wanted to remove all lines containing the string "dog", I could use the
following command.
That command would also remove any lines containing "dogs", "dogged", etc.
If I just wanted to remove lines containing "dog", I could use
:g/dog /d
.
You can, of course, specify the pattern on which you wish to search using
regular expressions. E.g., if I wanted to remove any lines containing
either "dog" or "hog", I could use the command below.
By putting the leters "d" and "h" within
brackets, I indicate to vi that it should remove any
line that has either a "d" or an "h" followed by "og".
[ More Info ]
[/software/editors/vi]
permanent link
Mon, Nov 13, 2017 11:20 pm
Limit number of records displayed in SQL output
If you have a lot of
records in a
table
in a
MySQL,
MariaDB, etc. database that
are returned when you use the
SQL
SELECT
command to query for matching records, the results may scroll by so that you
can't see the initially returned rows. You can limit the number of rows
displayed by appending
LIMIT n
at the end of the command where
n is the number of records you want to see at a time.
E.g., if I had 100 records in a table named
Sales, but wanted to page
through them 10 records at a time, I could use
SELECT * FROM Sales LIMIT
10;
or, if I just wanted to view one
field/
column
in the table, e.g. "Description", I could use
SELECT Description FROM
Sales LIMIT 10;
[/software/database/sql]
permanent link
Sun, Nov 12, 2017 7:46 pm
Manually synchronizing time on a Microsoft Windows system
I noticed the time on a Microsoft Windows 7 Professional system was ahead of
the actual time by 22 minutes. The system was part of a
Windows domain,
but the domain controller (DC) was decommissioned. I checked
the Network Time Protocol (NTP) settings from a
command-line interface (CLI) by opening a
command prompt window with
administrator level access and using the Microsoft Windows
w32tm command.
to check the current configuration for querying time servers.
C:\>w32tm /query /peers
#Peers: 1
Peer:
State: Pending
Time Remaining: 1441.6885058s
Mode: 0 (reserved)
Stratum: 0 (unspecified)
PeerPoll Interval: 0 (unspecified)
HostPoll Interval: 0 (unspecified)
C:\>w32tm /query /status
Leap Indicator: 3(last minute has 61 seconds)
Stratum: 0 (unspecified)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0000000s
Root Dispersion: 0.0000000s
ReferenceId: 0x00000000 (unspecified)
Last Successful Sync Time: unspecified
Source: Free-running System Clock
Poll Interval: 10 (1024s)
C:>
[ More Info ]
[/network/ntp]
permanent link
Sat, Nov 11, 2017 10:31 pm
Configuring a VPN connection on Windows 7
To set up a Windows 7 system to use
Internet Key Exchange version 2 (IKEv2) for establishing a
virtual private network (VPN) connection, take the following steps:
-
Click on the Windows
Start button at the lower, left-hand corner of the screen, or tap the
Windows key on the keyboard
and select Control Panel.
-
From the Control Panel, click on Network and Internet
-
Click on Network and Sharing Center.
-
Click on Set up a new connection or network.
-
Click on Connect to a workplace at the "Choose a connection option"
window.
-
At the Connect to a Workplace window, click on Use my Internet
connection (VPN).
-
At the next window you will see "Type the Internet address to connect to".
Type the fully qualified domain name (FQDN) or IP address for the VPN
provider, e.g., example.com, in the Internet address field. The default
destination name is "VPN Connection," but you can change it if you wish
to reflect the particular VPN provider, e.g., "Ajax VPN Connection". Check
the check box next to "Don't connect now; just set it up so I can connect
later" and then click on the Next button.
Note: if you don't have a VPN service already,
Hide.me offers a free VPN service you can use for testing, though it has
more limited features and geographical locations than the Hide.me paid service.
-
At the next window, you can provide the user name and password for the
VPN account. If you don't want to have to provide those each time you
establish the VPN connection, check the check box next to "Remember this
password" then click on Create.
-
When you see "The connection is ready to use," click on the Close
button rather than Connect now.
-
Then back at the Network and Sharing Center window, you can click on
Connect to a Network and select the VPN connection.
Or you can click on Change adapter settings which will show you
the available network connections. You will need to be already connected to
the Internet via a wired or wireless connection to establish a connection to
the VPN. You can then double-click on the VPN connection entry in the
list. You should see "WAN Miniport (IKEv2)" on that entry.
If you need to make any changes to the settings, you can right-click on the
relevant VPN connection and choose Properties.
-
A window will open with fields for the user name and password for the domain.
If you chose to save those values previously, you can simply click on
Connect at this point to establish the VPN connection.
[ More Info ]
[/os/windows/win7]
permanent link
Fri, Nov 10, 2017 5:19 pm
Removing a site's cookies in Google Chrome 62
To remove
cookies for a specific site in
Google
Chrome version 62, take the following steps:
-
Put
chrome://settings/siteData
in the Chrome address bar
where you normally place URLs which will show you a list of all the cookies stored
on the system.
-
In the "Search cookies" field, type the relevant domain name, e.g.,
mattel.com; you will then see only the cookies for that particular domain.
-
Click on "REMOVE ALL SHOWN" to remove all of the cookies for the domain. You
will then be warned "This will delete any data stored on your device for all
the sites shown. Do you want to continue?" Click on the "CLEAR ALL" button
to delete all of the cookies for the domain.
You can also go directly to the list of all the cookies associated with
a particular domain by putting chrome://settings/cookies/detail?site=
followed by the domain name in the address bar, e.g.,
chrome://settings/cookies/detail?site=mattel.com
.
You can then click on "REMOVE ALL" to delete all of the listed cookies for
the domain.
Note:
Tested with Google Chrome Version 62.0.3202.89 (Official Build) (32-bit)
on a system running Microsoft Windows 7 Professional.
[ More Info ]
[/network/web/browser/chrome]
permanent link
Privacy Policy
Contact