MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
May
Sun Mon Tue Wed Thu Fri Sat
   
24 25 26
27 28 29 30 31    
2018
Months
MayJun
Jul Aug Sep
Oct Nov Dec


Fri, May 18, 2018 10:56 pm

Installing new packages for WinPython

To install a new package/module under WinPython, double-click on WinPython Command Prompt in the directory where you installed WinPython to open a command prompt window.

WinPython installation directory

At the command prompt window type pip install pkgname where pkgname is the name of the package you wish to install. If the package is already present, you will see the message "requirement already satisfied."

[ More Info ]

[/languages/python] permanent link

Thu, May 17, 2018 11:15 pm

Identifying Apple systems on the network

If you need to determine whether a system on the network is an Apple system, there are a number of means you can use to help identify whether the system is, or is at least likely to be, manufactured by Apple. E.g., if the system is on the same local area network (LAN) as a system from which you can ping it, you can check the media access control (MAC) address associated with the IP address you just pinged using the Address Resolution Protocol (ARP), since the first 6 hexadecimal digits of the MAC address can be used to identify the manufacturer of the network interface controller (NIC) in the device pinged. This technique won't work if there is an intervening router between the device from which the ping is sent and the receiving device, though, since the arp address you will see when there are intervening network hops is the one of the first hop device. You can see the number of hops between the source and destination hosts using the traceroute command (tracert is the equivalent command on Microsoft Windows systems). E.g., in the example below, I issued a ping command from a Terminal window on my MacBook Pro laptop running OS X El Capitan (10.11.6). When I then peformed a reverse DNS lookup on the IP address using nslookup, the fully qualified domain name (FQDN) identified the device as an iPad. The FQDN usually won't identify the type of device so clearly, but a check of the MAC address may indicate the device was manufacturered by Apple. You can get the MAC address using the arp command.

$ ping -c 1 192.168.196.212
PING 192.168.196.212 (192.168.196.212): 56 data bytes
64 bytes from 192.168.196.212: icmp_seq=0 ttl=64 time=45.140 ms

--- 192.168.196.212 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 45.140/45.140/45.140/0.000 ms
$ nslookup 192.168.196.212
Server:		192.168.10.134
Address:	192.168.10.134#53

212.196.168.192.in-addr.arpa	name = Margarets-iPad.abc.example.com

$ arp Margarets-iPad.abc.example.com
margarets-ipad.abc.example.com (192.168.196.212) at 78:7b:8a:55:bb:35 on en0 ifscope [ethernet]
$

[ More Info ]

[/os/os-x] permanent link

Mon, May 14, 2018 11:09 pm

Using local time for date calculations in SQLite

I have an SQLite database that I use to track approval of tasks. Every Monday, I need to generate a count of the number of tasks approved from the prior Tuesday through the Monday on which I'm creating the report. The approval dates are stored in the database as an integer and I enter them in the form 2018-05-14. I use the following SQL command in a Python script to determine the number I've approved in the last week:

sql = 'SELECT COUNT(*) FROM Tasks WHERE Approved >= date(CURRENT_DATE,"-6 day")'

But I noticed that the count didn't always include the tasks I approved on the prior Tuesday. E.g., when I ran the script tonight, May 14, the number reported was 5, yet I expected the result to be 7.

[ More Info ]

[/software/database/sqlite] permanent link

Sun, May 13, 2018 9:55 pm

WinPython - Python for Microsoft Windows

If you wish to run Python on a Microsoft Windows system, you can use WinPython. The first window you will see when run run the downloaded installation file is one for the license agreement, which notes "WinPython components are distributed as they were received from their copyright holder, under their own copyright and/or license, and without any linking with each other." WinPython itself uses the MIT license. Once you accede to the license, you will be prompted for a destination folder. By default that will be a WinPython directory created beneath the directory where you're running the downloaded file from, but you can change the location. When the installation has been completed, a window will appear where you can click on a Finish button to exit from the installation program.

[ More Info ]

[/languages/python] permanent link

Sat, May 12, 2018 8:58 pm

Undo and Redo in Microsoft Windows File Explorer

If you wish to undo or redo an operation you just performed in the Microsoft Windows File Explorer on a Windows 10 system, you can do so by hitting Ctrl+Z (hit the Ctrl and Z keys simultaneously). E.g., if you inadvertently deleted a file, sending it to the recycle bin, you can hit those keys together to restore the file to its prior location. If you wanted to redo an operation you undid, you can hit Ctrl+Y to redo the previously undone operation. E.g., if I deleted a file, then undeleted it with Ctrl+Z, I could redo the delete action by hitting Ctrl+Y sending it back to the recycle bin.

If you wish, you can add undo and redo icons to the Quick Access Toolbar at the top of the Explorer window by clicking on the icon of a downward pointing arrowhead with a horizontal line above it that appears at the top of the Explorer window. You can then select "Undo" and "Redo" from the menu that appears. Select both, so that you see checkmarks next to each of those options. You should then see curved Undo and Redo arrows next to the button you clicked on for the Customize Quick Access Toolbar. You can now use those arrows, in addition to the shortcut keys, if you prefer to undo and redo actions in the File Explorer.

[ More Info ]

[/os/windows/win10] permanent link

Mon, May 07, 2018 11:42 pm

Performing a bare metal backup on a Windows 10 system

If you want to perform a "bare metal" backup of a Microsoft Windows 10 system to an external USB drive without a third-party application, you can use the Backup and Restore utility that is provided by Microsoft with the operating system. You can run the program from a command-line interface (CLI) by opening a command prompt window with administrator privileges and issuing the command wbadmin start backup -backupTarget:x -allcritical -quiet where x is the drive letter for the drive where you wish to store the backup. When you add the -quiet option, the backup will be run with no prompts for the user. The --allcritical option "creates a backup that includes all critical volumes (critical volumes contain the operating system files and components)."

[ More Info ]

[/os/windows/commands] permanent link

Fri, Mar 30, 2018 10:23 pm

Cloudmark CSI IP Reputation Remediation

I manage an email server that uses an Atlantic Broadband SMTP server as a smart host. I maintain a mailing list on the server that currently has about 1,300 email addresses. Each month someone sends a monthly newsletter to the email addresses in that list; the people associated with those addresses are all members of a retirees organization and have all indicated they wish to receive that organization's newsletter. Usually, the newsletter is transmitted without problems, but occasionally I will find that email transmitted from the server is silently discarded with no bounced emai indicating why that is occurring. Though that doesn't occur often, when it occurs, it usually occurs when the newsletter is sent. When the problem occurs, as it did yesterday, I have to request that the IP address of my server be unblocked. Initially, I would call the ISP's phone support number, i.e, an Atlantic Broadband support number, but they would in turn have to contact their email service provider, since the email service they provide is outsourced to Echo Labs as I found from examining email headers - see Email sent via an Atlantic Broadband SMTP server not being delivered. But I found that I could get the block removed more quickly if I submitted a request through Cloudmark, an anti-spam company co-founded by Vipul Ved Prakash and Napster's co-founder Jordan Ritter, which provides an anti-spam service used by Echo Labs.

[ More Info ]

[/network/email/spam/blocklists] permanent link

Sat, Mar 24, 2018 10:46 pm

Deleting old Windows backups with wbadmin

I had set up the built-in Windows 7 backup utility to run on my mother-in-law's Windows 10 PC to back up the computer's internal hard disk drive (HDD) to an external USB drive. She asked me to verify that the backup was still functioning, so I checked the status of the backup process on her Windows 10 (version 1709) system using the wbadmin command by opening a command prompt window with administrator access to run the wbadmin get versions command to obtain a list of all the backups. I found that the last backup had occurred on December 31, 2017.

[ More Info ]

[/os/windows/commands] permanent link

Fri, Mar 23, 2018 11:05 pm

DNS - Standard Query Response Refused

While filtering on Domain Name System (DNS) queries in the Wireshark packet capture tool with a filter of udp.port==53 on a MacBook Pro laptop running OS X El Capitan (10.11.6), I saw a lot of "Stanard query response refused" replies in the "Info" field for responses from the DNS server. When I expanded the "flags" section of the DNS response for those replies from the DNS server, I saw "Reply code: Refused (5)" for some IP address lookups, though other DNS queries were being answered with an IP address.

[ More Info ]

[/network/dns] permanent link

Thu, Mar 01, 2018 10:44 pm

Determining the the elapsed time between two timestamps in Excel

If you have an Excel workbook containing two cells that contain a date and time and you want to know the time difference between them in days and hours, you can subtract one from the other and get the elapsed time between the two timestamps in days and hours by using a custom date and time format for the cell that will hold the results. E.g., suppose I have a spreadsheet with the following timestamps in columns A and B:

  A B C
1 Start Time End Time Elapsed Time
2 1/1/18 0:01 3/1/18 15:03  
3 2/6/18 15:18 2/7/18 18:07  
4 3/1/18 7:55 3/1/18 13:01  

The cells containing the date and time have the custom format m/d/yy h:mm.

[ More Info ]

[/software/office/excel] permanent link

Tue, Feb 27, 2018 11:10 pm

Error message "You don't have permission to access / on this server."

I had been running an Apache webserver under OS X El Capitan on my MacBook Pro laptop. After an upgrade on the laptop, now running OS X El Capitan (10.11.6), when I tried accessing the site via http://localhost, I saw a page with the title "403 Forbidden" and the following text displayed on the page:

Forbidden

You don't have permission to access / on this server.

[ More Info ]

[/os/os-x/apache] permanent link

Mon, Feb 26, 2018 11:46 pm

Outlook reports a security problem with an encryption certificate

When I attempted to send a PKI-encrypted email message to several recipients from Microsoft Outlook for Mac 2016 (version 15.41), I saw the message "Encryption certificates for some recipients could not be found in the Outlook Contacts. Do you want to search the Active Directory servers for them?"

Encryption certificates for some recipients could not be found in the 
Outlook Contacts

I clicked on OK and then saw the message "The following recipients have encryption certificates with security problems. Do you still want to send this encrypted message?"

Outlook - encryption certificate with security problem

I clicked on Cancel and checked on whether Outlook was storing a public key certificate for the person in my contacts list. He was in the contact list, but there was no certificate associated with the person in the contacts list when I clicked on the Certificates tab.

[ More Info ]

[/network/email/clients/outlook] permanent link

Sat, Feb 24, 2018 10:51 pm

Installing gnuplot and using it for a simple graph

Gnuplot is a command-line interface (CLI) program that can be used to create two and three-dimensional plots on a variety of operating systems including Linux, OS X/macOS, Unix, and Microsoft Windows systems. If you use CentOS Linux, you can install it with the yum package management utility with yum install gnuplot. The information shown below is for the gnuplot 4.6.2 package on a CentOS system.

$ rpm -qi gnuplot
Name        : gnuplot
Version     : 4.6.2
Release     : 3.el7
Architecture: x86_64
Install Date: Fri 23 Feb 2018 09:30:00 PM EST
Group       : Applications/Engineering
Size        : 1551543
License     : gnuplot and MIT
Signature   : RSA/SHA256, Thu 03 Jul 2014 09:41:15 PM EDT, Key ID 24c6a8a7f4a80eb5
Source RPM  : gnuplot-4.6.2-3.el7.src.rpm
Build Date  : Tue 10 Jun 2014 12:07:58 AM EDT
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.gnuplot.info/
Summary     : A program for plotting mathematical expressions and data
Description :
Gnuplot is a command-line driven, interactive function plotting
program especially suited for scientific data representation.  Gnuplot
can be used to plot functions and data points in both two and three
dimensions and in many different formats.

Install gnuplot if you need a graphics package for scientific data
representation.
$

Once you've installed the software on a Linux system, you can start the program by typing gnuplot and hitting Enter. You will get a gnuplot prompt where you can type commands, e.g., help for information on using the program. You can terminate the program by typing exit at the prompt.

[ More Info ]

[/software/graph/gnuplot] permanent link

Thu, Feb 22, 2018 11:01 pm

Installing GIMP on OS X

To install the GNU Image Manipulation Program (GIMP) on OS X systems, take the following steps:
  1. Download the GIMP installation file from GIMP - Downloads. The file is an Apple Disk Image .dmg file.
  2. Double-click on the downloaded file to start the installation process.
  3. When the GIMP installation window opens, you will see "GIMP.app" in the window that opens. Click on "GIMP.app" and drag it over into a Finder window with the Applications folder displayed to complete the installation of the GIMP application into that folder.

[ More Info ]

[/os/os-x] permanent link

Mon, Feb 19, 2018 11:24 pm

xlrd and hidden worksheets

I use the xlrd module in Python scripts to extract data from Excel workbooks. You can use the Python xlrd module to list the worksheets in a workbook and you can use the xlrd.sheet "visibility" value to determine whether a sheet is hidden and, if it is hidden, whether a user can unhide the sheet. The value should be either 0, 1, or 2 with the numbers having the following meaning:

Visibility of the sheet:

0 = visible
1 = hidden (can be unhidden by user -- Format -> Sheet -> Unhide)
2 = "very hidden" (can be unhidden only by VBA macro)

[ More Info ]

[/languages/python/excel] permanent link

Sun, Feb 18, 2018 10:10 pm

Displaying a tooltip

A tooltip, aka infotip or hint, is a small box of text that appears when a user hovers the mouse pointer over an item, such as a particular word or phrase, on a webpage. If you wish to display a tooltip when a user hovers the mouse pointer over text on a webpage, there are a number of ways you can do so. The simplest way to do so is to specify a title attribute, which is an HTML global attribute with the span tag. E.g.:

<span title="This is the tooltip text to be displayed when the mouse is hovered over the spanned text.">example text</span>

This is an example using the above technique with example text.

[ More Info ]

[/network/web/html] permanent link

Sat, Feb 17, 2018 1:43 pm

Windows 10 Blue Screen - Page Fault in Nonpaged Area

When we awoke this morning, my wife found a blue screen displayed on her PC running Windows 10 Professional with the message "Your PC ran into a problem and needs to restart. We'll restart for you." and "Stop Code: PAGE FAULT in NONPAGED AREA". She tried rebooting the system several times and powering the system off and on, but the message kept reappearing. I rebooted the system and hit the F8 key before Windows started - you may have to reboot several times to hit the key right before Windows starts to have it take effect. That took me to a Recovery window where I saw the message It looks like Windows didn't load correctly. If you'd like to restart and try again, choose "Restart my PC" below. Otherwise, choose "See advanced repair options" for troubleshooting tools and advanced options.

Recovery - Didn't load correctly

[ More Info ]

[/os/windows/win10] permanent link

Thu, Feb 15, 2018 10:22 pm

Enabling the Developer Tab in Excel for Mac 2016

To be able to view the Developer Tab in Microsoft Excel for Mac 2016, take the following steps:
  1. Click on Excel at the top, left-hand corner of the Excel window and the select Preferences.
  2. On the Excel Preferences window, click on View in the Authoring section.
  3. In the View window, click on the check box next to Developer tab, which you will see in the In Ribbon, Show section.
  4. You can close that window by clicking on the "x" in the red circle at the top, left-hand corner of the window. You should then see Developer as a selectable option to the right of Data, Review, and View on the menu bar at the top of the Excel window.
  5. If you click on the Developer tab, you should see options that include Visual Basic, Macros, Record Macro, Add-ins, Excel Add-ins, Button, Group Box, Combo Box, Label, Check Box, Scroll Bar, List Box, Option Button, and Spinner.

[ More Info ]

[/software/office/excel] permanent link

Wed, Feb 14, 2018 9:31 pm

Extracting embedded Microsoft Office files from an Excel spreadsheet

I work with Excel workbooks on my MacBook Pro laptop that have embedded PowerPoint slides on some worksheets. The workbooks, which I need to review, are created by others. When I review them, I extract information from the Excel workbooks to an SQLite database with Python and also have begun extracting information embedded by Object Linking and Embedding (OLE) into files as noted in Extracting the contents of a directory in a zipfile using Python. Some of the embedded files are PowerPoint files, but when they are extracted they have a .bin extension, which I can't open in PowerPoint without changing the filename extension from .bin to .ppt. To automate the renaming process, I created a Python script, extract_embedded.py that will extract the embedded information to files in an "embedded" directory beneath the current working directory and then rename any .bin files that are PowerPoint files to have a .ppt extension. The script is shown below.

[ More Info ]

[/languages/python/excel] permanent link

Sat, Feb 10, 2018 10:55 pm

Extracting the contents of a directory in a zipfile using Python

A Microsoft Excel file with an .xlsx or .xlsm filename extension is an Office Open XML (OpenXML) zipped, XML-based file. The OpenXML format was developed by Microsoft for spreadsheets, charts, presentations and word processing documents. If you change the file extension to .zip by renaming the file, you can extract the contents of the zip file as you would with any other zip file - see Zipping and unzipping Excel xlsx files. Excel workbooks can contain other documents embedded within them using Object Linking and Embedding (OLE) technology - see Using olefile to obtain metadata from an OLE CDF V2 file. I often need to extract an embedded PowerPoint slide or Visio diagram from Excel .xlsm files, so I've been renaming the files to zip files and unzipping them as I would other zip files, but, since I want to automate the process and extract just specific embedded files for further processing within a Python script, I created the script below to extract the embedded files, which are contained within a xl/embeddings subdirectory within the .xlsm zip files. The script uses the zipfile module to deal with the zip files. Python's OS module is used to check for the existence of the destination directory and create it, if it doesn't yet exist.

#!/usr/bin/python

import os, zipfile

dirToExtract = "xl/embeddings/"
destinationDir = "embedded"
infile = raw_input("Enter zipfile: ")
archive = zipfile.ZipFile(infile)

if not os.path.exists(destinationDir):
    os.makedirs(destinationDir)

for file in archive.namelist():
    if file.startswith(dirToExtract):
        archive.extract(file, destinationDir)

The script prompts for the file to be unzipped and then extracts just the "xl/embeddings" folder and the files contained within it to a new directory it will create within the current working directory. The new directory will be named "embedded". After extracting the contents of the "xl/embeddings" directory to the newly created "embedded" folder, I had the the files below in the case of the particular .xlsm file I used for this example.

[ More Info ]

[/languages/python/excel] permanent link

Fri, Feb 09, 2018 10:04 pm

Using the Python xlrd module to list the worksheets in a workbook

To view the list of sheets in an Excel spreadsheet, I can use the xlrd module within the Python script below to obtain the list of worksheets within the workbook.

#!/usr/bin/python

import xlrd as xl

file_name = raw_input("File: ")
workbook = xl.open_workbook(file_name)
print workbook.sheet_names()

If I use the script to display the list of worksheets in a workbook named report.xlsx that has three sheets named alpha, beta, and gamma, I would see the following output:

$ ./sheetlist.py
File: report.xlsx
[u'alpha', u'beta', u'gamma']
$

[ More Info ]

[/languages/python/excel] permanent link

Sun, Feb 04, 2018 11:03 pm

Run a cronjob at the end of every year

At the end of every year, I need to create some new directories to hold log files with the directory name reflecting the new year on a CentOS Linux system. To create those directories on the last day of the year, December 31, I can use the cron utility found on Linux/Unix and OS X/MacOS systems to schedule a cronjob to run on the last day of the year. I can edit the crontab file that holds jobs to be run at a scheduled time or times by issuing the crontab command crontab -e, which will allow me to edit the file with the vi editor. If the vi editor is the default editor, which it likely is, but you are unfamiliar with that editor, you can change the editor for the current login session to the GNU nano text editor, which may be easier to use for someone unfamiliar with the vi text editor, by issuing the following command at the command line.

export EDITOR="/usr/bin/nano"

The value will be reset when you log off or you can reset it manually with the command below:

export EDITOR="/usr/bin/vi"

I can put the following line in the crontab file to run my script named end-of-year-dirs at 7:00 AM on December 31 of every year. When you add a new entry, be sure to hit the Enter key at the end of the line.

0 7 31 DEC * /home/jdoe/scripts/end-of-year-dirs

[ More Info ]

[/os/unix/commands] permanent link

Sat, Feb 03, 2018 10:34 pm

Using PyInstaller to create an executable file from a Python script

If you wish to convert Python scripts to executable files that you can run on systems where Python or all of the needed dependencies for the script are not installed, one program that is available for Linux, Mac OS X, Solaris, AIX, or Microsoft Windows systems is PyInstaller. If you have the pip package manager installed, you can install PyInstaller by running the command below from the root account.

pip install pyinstaller

To then create an executable file that will run on other sytems with that same operating system, e.g., you can create an executable file on one Linux system that will run on another Linux system or create an .exe file on a Microsoft Windows system that can be ported to another Windos system, you can issue the command pyinstaller yourprogram.py.

[ More Info ]

[/languages/python] permanent link

Fri, Feb 02, 2018 11:16 pm

Extracting information from a .msg file with Python

I received a .msg file attachment to an email message I received with Microsoft Outlook for Mac, which is part of Microsoft Office 2016 on my MacBook Pro laptop. When I double-clicked on the attachment in Outlook to view the contents of the file, I saw "There is no application specified to open the document Re_ Netbond.msg."

Msg - Open 
Attachment

And also a window giving me an option to "Search App Store" with the message "Search the App Store for an application that can open this document, or choose an existing application on your computer."

[ More Info ]

[/languages/python] permanent link

Wed, Jan 31, 2018 11:48 pm

Using olefile to obtain metadata from an OLE CDF V2 file

Microsoft's Object Linking and Embedding (OLE) technology allows embedding and linking to documents and other objects. OLE allows the addition of different kinds of data to a document from different applications, such as a text editor and an image editor. This creates a Compound File Binary Format (CFBF), aka a Compound File, Compound Document format, or Composite Document File V2 (CDF V2) document.

While using my MacBook Pro laptop, which is currently running the OS X El Capitan (10.11.6) operating system, I often need to extract embedded documents from an Excel .xlsm file. I do that by renaming the file to have a .zip rather than a .xlsm file extension. I can then extract the files contained within the .zip file just as I would any zip file. Within the directory structure created by unzipping the zip file there is an xl/embeddings subdirectory with .bin files within it.

$ ls xl/embeddings
Microsoft_Visio_Drawing1.vsdx	oleObject2.bin
Microsoft_Visio_Drawing2.vsdx	oleObject3.bin
oleObject1.bin
$

[ More Info ]

[/languages/python] permanent link

Tue, Jan 30, 2018 11:22 pm

Using Python to extract data from a spreadsheet and put it in a database

I need to review spreadsheets related to work requests on a daily basis. The Excel workbooks have multiple worksheets within them. I have been manually copying data from specific cells in one of the worksheets and pasting it into a SQLite database. I use DB Browser for SQLite to paste the information into the database. I wanted to automate the process of extracting the data from the .xlsm or .xlsx workbook files and inserting it into the SQLite database using a Python script. So I initially created a script that I could run from a Teminal window on my MacBook Pro laptop, as noted in Extracting data from cells in an Excel workbook with Python, that would just print the information to the Terminal window's command-line interface. I had another script to import data from a text file into an SQLite database with Python, so I combined code from that script with the one to read data from the spreadsheets to add the data to a table in the database.

[ More Info ]

[/languages/python/excel] permanent link

Sun, Jan 28, 2018 10:15 pm

Reading specific lines from a file into another file within Vi

If you need to read lines from another file into the file you are currently editing within the Vi text editor, you can do so by utilizing the editor's ability to execute an external command, e.g., a Linux/Unix shell command, by entering an exclamation mark followed by the external command. E.g., if I wanted to read the first 55 lines from the file ~/temp/lincoln.txt, I could e nter Vi's colon mode by hitting Esc followed by the colon character. I could then type r, which is the command used to read from another file. But, instead of immediately typing the file name, e.g. :r ~/temp/lincoln.txt, I could use the head utility to read the first fifty-five lines of the file by typing head -55 followed by the path to the file and the file name. E.g.:

:r !head -55 ~/temp/lincoln.txt

If, instead, I wanted to read the last 14 lines of the file, I could use the tail command.

:r !tail -14 ~/temp/lincoln.txt

If I wanted to include specific lines from the other file into the one I'm currently editing, e.g., lines 10 through 15, I could use the sed command as shown below.

:r !sed -n 10,15p ~/temp/lincoln.txt

[ More Info ]

[/software/editors/vi] permanent link

Sat, Jan 27, 2018 6:50 pm

Turning on UltraVNC server service on a Windows system

If you installed UltraVNC, which is free and open-source software, to provide Virtual Network Computing (VNC) connectivity from/to a system for remote administration capabilities, but haven't enabled the UltraVNC server service to allow the system itself to be managed remotely, you can enable that service by taking the following steps:

  1. Run the uvnc_settings.exe program, which you can find in the directory where you installed UltraVNC. You will need to provide the login credentials for an account with administrator-level access on the system.
  2. Click on the Service tab then click on the Install Service button, which will install the software as a service, i.e. as a function provided by a server, on the system.
  3. Once the service is installed, you can click on the Start Service button to run the service.
  4. You can set the password to be used for VNC connections by clicking on the Security tab. You can set two passwords. The "VNC Password" will allow remote control of the system whereas the "View-Only Password" will only allow viewing the display on the system, which is helpful if you want to show someone what is happening on the system without giving the person the ability to control the system. You can then click on the OK button to close the UltraVNC settings window.

[ More Info ]

[/os/windows/software/remote-control/vnc/ultravnc] permanent link

Fri, Jan 26, 2018 10:51 pm

Extracting data from cells in an Excel workbook with Python

I've been using xlrd to extract a column from an Excel spreadsheet with a Python script on my MacBook Pro laptop. With xlrd, you can read data from cells in a workbook by specifying a specific sheet and the cells from which you wish to extract the data in spreadsheet programs, such as Microsoft Excel, Apache OpenOffice Calc, or LibreOffice Cale.

With spreadsheet applications you normally have rows sequenced by numbers and columns sequenced by alphabetical characters. With xlrd, though, both rows and columns are specified by numbers with the first row starting at 0 and the first column starting at 0 as well.

[ More Info ]

[/languages/python/excel] permanent link

Wed, Jan 24, 2018 10:39 pm

Determine NTP server on a Microsoft Windows system

If you wish to determine the Network Time Protocol (NTP) server that a Microsoft Windows system is using to synchronize its time, you can find that information in the Windows registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer.

NtpServer

You can query that value from a command-line interface (CLI) with the command reg query HKLM\System\CurrentControlSet\Services\W32Time\Parameters. To see just the NTP server fully qualified domain name (FQDN), you can pipe the output of the reg query command to the find command and search for "NtpServer".

C:\>reg query HKLM\System\CurrentControlSet\Services\W32Time\Parameters

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\Parameters
    NtpServer    REG_SZ    time.windows.com,0x9
    ServiceDll    REG_EXPAND_SZ    %systemroot%\system32\w32time.dll
    ServiceDllUnloadOnStop    REG_DWORD    0x1
    ServiceMain    REG_SZ    SvchostEntry_W32Time
    Type    REG_SZ    NTP


C:\Users\Administrator.LABYRINTH>reg query HKLM\System\CurrentControlSet\Services\W32Time\Parameters | find "NtpServer"
    NtpServer    REG_SZ    time.windows.com,0x9

C:\>

In the above example, the time server is time.windows.com, an NTP server provided by Microsoft.

[/network/ntp] permanent link

Tue, Jan 23, 2018 9:42 pm

Using key pairs with SSH

The Secure Shell (SSH) protocol provides a means one can use for secure, encrypted connections between systems for logins or file transfers. One can use a username and password to login from an SSH client to an SSH server or one can use a public and private key combination where a public key for a user's account is stored on a remote SSH server while a corresponding private key is stored on the system from which the user will initiate the SSH or SFTP connection. On Linux systems, private keys are normally stored in the .ssh directory beneath the home directory for your account. If you haven't created any keys yet, the directory may only contain a known_hosts file that contains public keys for servers you've previously logged into via SSH.

[ More Info ]

[/network/ssh] permanent link

Mon, Jan 22, 2018 5:26 pm

This page intentionally left blank

Books and other documents may often include pages intentionally left blank stating "This page [is] intentionally left blank." As explained in the Wikipedia intentionally blank page article, this is often done due to the way pages are printed from a much larger sheet of paper or for legal reasons. On the web you can find an online equivalent in The This Page Intentionally Left Blank (TPILB) Project which notes:

In former times printed manuals had some blank pages, usually with the remark “this page intentionally left blank”. In most cases there had been technical reasons for that. Today almost all blank pages disappeared and if some still exist here and there, they present flatterly comments like “for your notes” instead of the real truth: This page intentionally left blank!

Nowadays the “This Page Intentionally Left Blank”-Project (TPILB-Project) tries to introduce these blank pages to the Web again. One reason is to keep alive the remembrance of these famous historical blank pages. But it is the primary reason to offer internet wanderers a place of quietness and simplicity on the overcrowded World Wide Web—a blank page for relaxing the restless mind.

Since I sometimes want to take browser screenshots that display options that are available in various browsers, but would prefer not to have any webpage content displayed in those screenshots, I've also created a this page intentionally left blank" page.

[/network/web/design] permanent link

Sun, Jan 21, 2018 10:56 pm

OpenVPN

OpenVPN is free and open-source software that provides Virtual Private Network (VPN) connectivity that is available for a variety of operating systems. To use the software on a Microsoft Windows 10 system, download the the installer for Windows Vista and later from the OpenVPN Community Downloads page; get the OpenVPN community software not the PrivateTunnel software from the OpenVPN project - I mistakenly downloaded and installed PrivateTunnel when I first went to the OpenVPN site and then had to uninstall PrivateTunnel.

[ More Info ]

[/os/windows/network/vpn] permanent link

Sat, Jan 20, 2018 11:01 pm

Updating Windows Subsystem for Linux

If you set up the Windows Subsystem for Linux on Windows 10, you may find that when you subsequently select Bash on Ubuntu on Windows to obtain a Bash shell prompt, that you see a message indicating that packages need to be updated. E.g.:

106 packages can be updated.
71 updates are security updates.
root@ANAHEIM:~#

You can get the updates with apt-get update. You can then install the updates with apt-get upgrade. You may need to respond to a "Do you want to continue?" prompt. If there are a lot of updated packages to install, be prepared to wait awhile for the upgrade process to complete.

[ More Info ]

[/os/windows/win10/Linux-Subsystem] permanent link

Fri, Jan 19, 2018 8:21 pm

Windows 7 to 10 upgrade hung at "finalizing your settings"

A few days ago I upgraded a Windows 7 Professional system to Windows 10. After the upgrade was installed, I saw a blue screen with "Finalizing your setings" with a spinning circle of dots above it. I didn't need to use the system for a few days, so I left it in that state for about 3 days. But with the same message displayed today, I was able to resolve the problem today by holding the power button down for about 15 seconds until the system powered off. When I powered the system back on afterwards I saw "Welcome to Windows 10!" with the account I had been logged into before the upgrade showing and a Next button near the bottom, right-hand corner of the screen. When I clicked on Next, I saw the "Choose privacy settings for your device" screen, though I had made those selections during the upgrade process previously. I altered the selections again as I had before and then saw a "Meet Cortana" screen where I clicked on Not now. I then saw "Finalizing your settings" again briefly and then the screen went black. I saw the disk activity LED for the laptop blinking rapidly for a minute and then I saw a circle of spinning dots on a blue background above "Please wait", but then I got to the "Press Ctrl+Alt+Delete to unlock" screen and was able to log into the laptop where within a few moments I saw "Thank you for updating to the latest version of Windows 10. I typed winver in the Cortana "Ask me anything" field and hit Enter which resulted in winver being shown as the best match. When I selected it, I saw the current version of Windows being displayed as Windows 10 Version 1709 (OS Build 16299.125).

[/os/windows/win10] permanent link

Thu, Jan 18, 2018 11:55 pm

Viewing the login history for a user on a Linux or OS X system

If you want to see the IP addresses from which logins have occurred on a Linux or OS X system, you can use the last command. E.g.:

$ last ann
ann      tty2                          Thu Jan  5 20:23 - 20:27  (00:03)
ann      tty2                          Thu Jan  5 20:05 - 20:06  (00:00)
ann      tty2                          Thu Jan  5 20:01 - 20:02  (00:00)
ann      pts/0        8.25.222.2       Sun Oct 30 10:43 - 16:59  (06:16)
ann      pts/0        192.168.0.2      Tue Oct 11 12:02 - 12:03  (00:00)
ann      pts/0        192.168.0.2      Tue Oct 11 12:01 - 12:01  (00:00)
ann      pts/32       192.168.1.6      Sat Jun 11 20:03 - 20:38  (00:35)
ann      pts/32       192.168.1.6      Sat Jun 11 13:23 - 14:22  (00:58)
ann      pts/14       192.168.1.5      Sun Feb 14 17:05 - 18:28 (6+01:22)
ann      pts/6        8.23.51.9        Sun Nov  8 09:23 - 10:16  (00:52)
ann      pts/6        8.23.51.9        Sat Nov  7 08:54 - 16:42  (07:48)
ann      pts/7        8.23.51.9        Fri Nov  6 16:47 - 16:49  (00:02)
ann      pts/6        8.23.51.9        Fri Nov  6 15:48 - 23:33  (07:44)
ann      pts/0        :0               Thu Sep 10 15:25 - 12:38 (129+22:13)
ann      :0           :0               Thu Sep 10 15:24 - 12:38 (129+22:14)
ann      pts/5        :0               Sun Aug 23 11:08 - crash (18+04:03)
ann      pts/4        :0               Sat Aug 22 21:16 - crash (18+17:56)
ann      pts/3        :0               Sat Aug 22 09:14 - crash (19+05:58)
ann      :0           :0               Sat Aug 22 09:07 - crash (19+06:05)
ann      pts/2        192.168.1.6      Sun Jul 19 15:41 - 20:59 (1+05:18)
ann      pts/2        192.168.1.5      Mon Jun 22 21:28 - 20:17 (18+22:49)
ann      pts/2        192.168.1.6      Fri Feb  6 21:26 - 21:26  (00:00)
ann      pts/5        192.168.0.3      Wed Nov  5 21:07 - 22:15  (01:08)


wtmp begins Sun Oct  5 20:09:11 2014
$

[ More Info ]

[/os/unix/commands] permanent link

Wed, Jan 17, 2018 11:01 pm

Renewing a DHCP lease under OS X

If you wish to renew a Dynamic Host Configuration Protocol (DHCP) lease on a Mac OS X system, you can do so by clicking on the Apple icon in the upper, left-hand corner of the screen, selecting System Preferences, and then Network , and then the relevant network interface, e.g., Wi-Fi. Then click on the Advanced button and then the TCP/IP tab. You can then click on the Renew DHCP Lease button to have the system attempt to renew its DHCP lease.

[ More Info ]

[/os/os-x] permanent link

Tue, Jan 16, 2018 10:30 pm

Can't insert worksheet in Microsoft Excel for Mac 2016

When I tried to insert another worksheet in an Excel workbook today, I found that the option to insert a new blank worksheet was grayed out when I clicked on Insert and selected Sheet.

Excel 2016 - insert sheet grayed out

When I tried another means of adding a new sheet by clicking on the plus sign at the right side of the list of sheets in the worksheet to add the sheet, I saw an alert message stating "Workbook is protected and cannot be changed."

[ More Info ]

[/software/office] permanent link

Mon, Jan 15, 2018 7:37 pm

Using the Windows Resource Monitor to monitor network activity

If you want to see the IP addresses to which a program on a Microsoft Windows system is establishing connections, you can use the Resource Monitor utility that is provided with Windows Vista and later versions of Windows to check on network connections from a particular application on the system. To start the program, you can click on the Windows Start button and type resmon or resmon.exe in the "Search programs and files" field on a Windows 7 system or the "Type here to search" field on a Windows 10 system. You should see the resmon utility returned as the best match.

When the Resource Monitor program is running, you can click on the Network tab and then TCP Connections to see network activity associated with programs currently running on the system . You can click on a column header, e.g. "Image" to sort the entries by the values in that column.

[ More Info ]

[/os/windows/network/monitoring/resmon] permanent link

Sun, Jan 14, 2018 11:02 pm

Comodo OCSP

After I started the gVim text editor on a Windows laptop, I saw a "firewall alert" from the Symantec antivirus/firewall software on the system stating "Suspicious network activity has been detected." I've used gVim on many other systems for many years, but those systems weren't running the Symantec security software. The Symantec software showed that gvim.exe was attempting a Domain Name System (DNS) query to port 53, the well-known port for DNS, to IP address 8.8.8.8, the Google DNS server specified on the system for DNS queries.

[ More Info ]

[/network/ocsp] permanent link

Sat, Jan 13, 2018 10:20 pm

Using downloaded Visio stencils with Visio 2016

I needed to add a Juniper SRX Series Services Gateway to a network diagram created with Microsoft Visio 2016, so I downloaded the SRX Series stencils from Juniper Networks Product Icons & Visio Stencils page. The downloaded file was a ZIP file, so I extracted the contents of that file. Within the .zip file were two .VSS files: Juniper Branch SRX Series.vss and Juniper Data Center SRX Series.vss. On a Microsoft Windows system, if you wish to make shapes within a .vss file available within Visio, you can copy the .vss files to the My Shapes directory within the Documents directory for the account you are using. To then access the shapes, click on More Shapes on the left side of the Visio 2016 window, then select My Shapes. You should then see the names for the .vss files you added to the My Shapes directory listed.

[ More Info ]

[/os/windows/office/visio] permanent link

Fri, Jan 12, 2018 10:55 pm

Viewing only the files created today on a Linux system

I sometimes need to see only the files created or modified today in a directory. On a Linux system, you can pipe the output of the ls command into the grep command looking for just today's date in the input to the grep command as shown below:

$ ls -al --time-style=+%D ~/Documents/*.zip | grep $(date +%D)
-rw-r--r--. 1 joe joe   269338 01/12/18 /home/joe/Documents/gloves.zip
$

You can specify how the date is displayed with +format where format is a particular format in which you want the date displayed - see Formatting the output from the date command on a Linux system. If you use +%D, the date will be displayed as m/d/y, i.e., month/day/year, e.g. 01/12/18 for January 12, 2018. By then using the grep command to search for that value, you can limit the displayed files to only those created or modified today.

[ More Info ]

[/os/unix/commands] permanent link

Sat, Jan 06, 2018 5:01 pm

Configuring Sendmail to always allow Steam email

A family member wasn't receiving email for a Steam account she created to play a PC game. Her email comes through a Sendmail email server I manage and I found that a Domain Name System-based Blackhole List (DNSBL), the Spam and Open Relay Blocking System (SORBS), had blocked email from the IP address that Valve had for the email server used to send email to her about the account. When I checked the sendmail log file, I found the following two entries:

Dec 29 21:10:26 moonpoint sendmail[27413]: ruleset=check_relay, arg1=smtp03.stea
mpowered.com, arg2=127.0.0.6, relay=smtp03.steampowered.com [208.64.202.39], rej
ect=550 5.7.1 Spam Block:mail from 208.64.202.39 refused - see http://dnsbl.sorb
s.net/
Dec 29 21:17:35 moonpoint sendmail[27661]: ruleset=check_relay, arg1=smtp01.stea
mpowered.com, arg2=127.0.0.6, relay=smtp01.steampowered.com [208.64.202.37], rej
ect=550 5.7.1 Spam Block:mail from 208.64.202.37 refused - see http://dnsbl.sorb
s.net/

Checking, I found the following IP addresses and fully qualified domain names (FQDNs) for Steam email servers:

IP AddressFQDN
208.64.202.36 smtp.steampowered.com
208.64.202.37 smtp01.steampowered.com
208.64.202.38 smtp02.steampowered.com
208.64.202.39 smtp03.steampowered.com
208.64.202.40 steammail.steampowered.com

To ensure that none of the DNSBLs I use with Sendmail will ever block email from the Steam email servers, I added the following lines to /etc/mail/access:

Connect:208.64.202.36                           OK
Connect:208.64.202.37                           OK
Connect:208.64.202.38                           OK
Connect:208.64.202.39                           OK
Connect:208.64.202.40                           OK

I then used the makemap hash command to rebuild the access database.

# makemap hash /etc/mail/access </etc/mail/access
#

Once I did that, she was able to receive the Steam-related email.

[/network/email/sendmail] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo