My wife could not hear audio today when she was viewing
YouTube
videos in the
Firefox browser. She thought the problem occurred after the automatic update
of Windows 10 on her system with the Anniversary Update. The YouTube audio
setting was not muted and was turned up to a level where I should have heard
sound and I found that I could hear audio for a music file outside of Firefox
and I could hear audio for the YouTube video she was trying to view within the
Microsoft
Edge web browser on the system. And when I went to the
CNN website, I was able
to listen to the audio associated with a news video on the site.
I could not delete a
TrueType font file, BlackFlowersBlossom.ttf, from the folder in which it was
located, which was a folder beneath the user's Documents directory on her Microsoft
Windows 10 system. If I attempted to delete it, a "File in Use" window opened with the
message "The action can't be completed because the file is open in System."
With other fonts beneath her Documents folder I was able to then open
Fonts from the
Control Panel, which you can get to in Microsoft Windows 10 by typing
fonts in the Cortana "Ask me anything" field at the bottom, left hand
corner of the screen, then selecting Fonts Control Panel and then selecting
the font and deleting it from the Fonts Control Panel. Once it was
deleted from the Fonts area of the Control Panel, I could then
delete the .ttf file from the user directory after rebooting the system.
With HTML 4, you could center a table using
align="center".
<table align="center">
...
</table>
However, that method of centering a table is deprecated in
HTML5.
To center a table, which is a block-level element, in HTML5 using
a Cascading Style Sheets method, you can use
a style that includes margin-left: auto; margin-right: auto;
as shown below.
I needed a way to perform a daily check that a Linux email server is able to
successfully transmit email to external email addresses. Such a test can
easily be scheduled using cron and mailx. You can use the crontab utility to schedule
mailx to run periodically and send a test message to a specified email address.
E.g., the following entry will send a test message at five minutes after noon
every day to john.doe@example.com:
The body of the message will contain the contents of the file
/home/jan/Documents/daily_mail_test_message.txt.
The first 5 elements on the line in the crontab file are scheduling
elements:
# ┌───────────── min (0 - 59)
# │ ┌────────────── hour (0 - 23)
# │ │ ┌─────────────── day of month (1 - 31)
# │ │ │ ┌──────────────── month (1 - 12)
# │ │ │ │ ┌───────────────── day of week (0 - 6) (0 to 6 are Sunday to
# │ │ │ │ │ Saturday, or use names; 7 is also Sunday)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * command to execute
If an asterisk is used for an element, that indicates that scheduling is
done for every possible value for that element. E.g., the 05 on the line
indicates five minutes after the hour, in this case 12 (noon) and the following
three asterisks indicate that the cron job should be run every day of every
month and every day of the week, i.e., Sunday to Saturday.
To query a
MariaDB - MariaDB is a
fork of
MySQL -
database using PHP, code similar to that shown below can be used.
In this exmple, the account used to query the database is johndoe
with a password of ThePassword. The database is named
Acme and contains a table named Accounts.
<?php
$con = mysql_connect("localhost","johndoe","ThePassword");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("Acme", $con);
$accounts = mysql_query("SELECT * FROM Accounts");
?>
I needed to upgrade two Microsoft Windows 10 systems running QuickBooks Pro
2011 to QuickBooks Pro 2016 after the Microsoft Windows 10 Anniversary
Update was installed automatically on those systems. QuickBooks Pro 2011 would
stop working after the user tried to proceed past the user name and password
prompt to open the company file - see
QuickBooks 2011 crashes at startup.
I found others complaining about the same problem after the Anniversary Update
was installed. I resolved the problem by updating QuickBooks to QuickBooks Pro
2016, but that upgrade was not without problems as well.
A user reported to me that QuickBooks was crashing when she tried to use it.
When I attempted to start the QuickBooks 2011 program, it would get to the
point where I could enter the username and password, but when I tried to
proceed beyong that point it would stop working with
the message below:
QuickBooks has stopped working
A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available.
If you wish to use a Google font on a web page, go to
fonts.google.com and select a font
that appeals to you. When you've selected a font, you will see "1 Family
Selected" at the bottom of the page; click on that text.
You will then see the code you need to include in your webpage to use the
font. E.g., if I want to use the
Yatra One font, I
would include the following HTML code in the HEAD section of the webpage:
You will also see the code to use in tags within the page to specify that
text should be displayed in the chosen font.
Then I could use font-family: 'Yatra One', cursive; to
specify use of that font. The inclusion of cursive after
'Yatra One' indicates to a vistor's browser that if the first
font listed, Yatra One, is unavailable or can't be used, whatever font it uses
for a cursive font should be used, instead. You can include multiple alternate
font options separated by commas. Note that in the link to the Google web page
for the style sheet for the font that "Yatra" and "One" have a plus sign
between them, instead of the space, but the font name is "Yatra One", which is
what is used when you specify the use of the font in the page. E.g.,
suppose I wanted to specify that font for use with an H3 header tag. I
might use code such as the following code:
In the above example, I changed the font color to orange and increased the
font size to 35 pixels and centered the text on the page. The text would be
displayed as shown below:
If you wish to create a zip file containing the contents of a folder on a
Microsoft Windows system from a command line interface (CLI), you can use
PowerShell
for that purpose. If you have version 5.0 or later of PowerShell, you can use
the compress-archive and expand-archive cmdlets -
cmdlets (pronounced command-lets) are specialized .NET
classes implementing a particular operation. You can determine which version
of PowerShell you have by opening a PowerShell window and typing
$psversiontable.
If you need to lookup the
American Standard
Code for Information Interchange (ASCII) code for a particular
character, you can do so on an OS X or Linux system via the ASCII
man
page. Simply type man ascii to see an ASCII table.
E.g., from the man page on an OS X system:
DESCRIPTION
The octal set:
000 nul 001 soh 002 stx 003 etx 004 eot 005 enq 006 ack 007 bel
010 bs 011 ht 012 nl 013 vt 014 np 015 cr 016 so 017 si
020 dle 021 dc1 022 dc2 023 dc3 024 dc4 025 nak 026 syn 027 etb
030 can 031 em 032 sub 033 esc 034 fs 035 gs 036 rs 037 us
040 sp 041 ! 042 " 043 # 044 $ 045 % 046 & 047 '
050 ( 051 ) 052 * 053 + 054 , 055 - 056 . 057 /
060 0 061 1 062 2 063 3 064 4 065 5 066 6 067 7
070 8 071 9 072 : 073 ; 074 < 075 = 076 > 077 ?
100 @ 101 A 102 B 103 C 104 D 105 E 106 F 107 G
110 H 111 I 112 J 113 K 114 L 115 M 116 N 117 O
120 P 121 Q 122 R 123 S 124 T 125 U 126 V 127 W
130 X 131 Y 132 Z 133 [ 134 \ 135 ] 136 ^ 137 _
140 ` 141 a 142 b 143 c 144 d 145 e 146 f 147 g
150 h 151 i 152 j 153 k 154 l 155 m 156 n 157 o
160 p 161 q 162 r 163 s 164 t 165 u 166 v 167 w
170 x 171 y 172 z 173 { 174 | 175 } 176 ~ 177 del
With HTML 4, you can horizontally center an image in a paragraph
using <p align="center">. E.g., the
image in the following paragraph would be cenered on the web page:
However, with
HTML5, use of the align parameter for horizontally aligning
a paragraph on a web page has been deprecated. E.g., if you check your HTML
code for adherence to the HTML 5 standard with the
Nu Html Checker provided by the
World
Wide Web Consortium, you will see an error similar to the following
one displayed if you are using align with the p (paragraph) tag.
Thealignattribute on thepelement is obsolete.
Use CSS instead.
From line 73, column 1; to line 73, column 18
tent -->↩↩<p align="center">↩<img src
If you need to query a device that supports the
Simple Network Management Protocol (SNMP), you can do
so from a command line interface, i.e, a shell prompt, on a Mac OS X or
Linux system using the
snmptest tool. To use the utility, issue the snmptest command specifying
the "community string", which is somewhat equivalent to a password, with
the -c option, specify the version of SNMP with the
-v option and then specify the IP address or
fully qualified domain name (FQDN). You will get
a "Variable:" prompt when you run the command. You can specify an
object identifider (OID) that you wish to query at that prompt. If
you hit Enter the prompt will be repeated. When you've finished
entering variables you wish to query, hit Enter at the next
"Variable" prompt without entering any variable. You should then see
the results returned as shown below. You can hit Ctrl-C to terminate
the program.
# snmptest -c SomeSecret0123 -v 1 192.168.0.11
Variable: system.sysLocation.0
Variable: system.sysContact.0
Variable:
Received Get Response from UDP: [192.168.0.11]:161->[0.0.0.0]:41231
requestid 0xAF07FC2 errstat 0x0 errindex 0x0
SNMPv2-MIB::sysLocation.0 = STRING: London
SNMPv2-MIB::sysContact.0 = STRING: John Doe
Variable: ^C
#
I received a call from someone today reporting that he could no longer check
email for his Verizon email account using
Thunderbird on his Apple laptop. He
reported that he was getting a message indicating that authorization
was failing. He had the same problem a few days ago and had contacted
Verzon support then. The Verizon support person he talked to reset his
password. He was able to check his email afterwards through the
webmail
interface Verizon provides to its users through webmail.verizon.net,
but the same password was not working with Thunderbird. I connected to
his system via TeamViewer and verified that the userid and password
that was working through the webmail interface was not working when used
in Thunderbird. I verified that the email settings in Thunderbird matched
what Verizion recommended, though he had been using those settings
successfully for a long time, so they should have been working today. The
settings inside Thunderbird were as follows:
POP3: pop.verizon.net (port 995, SSL/TLS, normal password)
SMTP: smtp.verizon.net (port 465, SSL/TLS, normal password)
The fold command, which
is found on Mac OS X and Linux systems, allows you to "fold" the contents of
specified files, or the standard input if no files are specified, breaking the
lines to have a maximum of eighty characters/columns by default,
though you can also specify that the line breaks be made at some
other character width with the -w width option.
A family member wanted to create her own custom playing cards for
Magic: The Gathering. She had downloaded a number of .mse-installer files
for the game and asked me to help her use them, since there was no application
on her system that would open them. I had previously installed
a computerized version of Magic called
Magic Workstation, an
application for Microsoft Windows systems, on her Microsoft Windows 10 system,
but it would not open the .mse-installer files. I found that such files are
associated with Magic Set
Editor (MSE). MSE has the following features:
Easily create your own cards for Magic: the Gathering, VS System, Yu-Gi-Oh!,
and other games
Create realistic looking images of your cards
Analyze your set and find ways to improve it
Play with your own cards in Apprentice and CCG Lackey
Create professional looking 'spoilers'
Keep all of your designs in one place
Templates available up to M15 frame keep your cards up to date
If you have a .mse-installer file, you can use it with
Magic Set Editor
by double-clicking on the file after Magic Set Editor has been installed
If there is an update available in the package, you can click on it to
select it.
If you wish to search for information within a .gz file produced by the
gzip utility,
which is a tool used for
data
compression, you don't have to uncompress the file first. Instead, you can
use the zgrep utility. E.g., if I
wished to search for the string "Splunk" in a
gzip compressed text file, if
I used grep, I wouldn't be
able to find the text for which I was searching since the contents of the file
were compressed, but I could find it with zgrep.
You can use the same options with the zgrep command that you can
use with grep - see zgrep man
page. E.g., I could determine how many times the pattern for which
I'm searching occurs in the file using the -c option.
$ zgrep -c "Splunk" tools.txt.gz
1
$
The zgrep utility is present by default on Mac OS X systems. You can
run it from a command line interface by opening a
Terminal
window (Terminal is found in the /Applications/Utilities
directory). It is also found on Linux systems. E.g., for
CentOS Linux systems, it
will be present if the gzip package has been installed.
You can benchmark a website's performance using the
AppleBench utility which is a tool available on Mac OS X
and Linux systems. The tool was originally developed to test
Apache web
servers, but can be used to test web servers running any web server
software. The tool will report the web server software that is in use on
the server being tested in a "Server Software" line in the output from the
tool.
On an OS X system, you can run it from a
Terminal window; the Terminal application is found in the
/Applications/Utilities directory by using the
ab command (man page) command.
To test a web site, e.g., example.com, you can issue a command in
the form ab http://example.com.
$ ab http://example.com/
This is ApacheBench, Version 2.3 <$Revision: 1663405 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking example.com (be patient).....done
Server Software: ECS
Server Hostname: example.com
Server Port: 80
Document Path: /
Document Length: 1270 bytes
Concurrency Level: 1
Time taken for tests: 0.042 seconds
Complete requests: 1
Failed requests: 0
Total transferred: 1622 bytes
HTML transferred: 1270 bytes
Requests per second: 23.96 [#/sec] (mean)
Time per request: 41.744 [ms] (mean)
Time per request: 41.744 [ms] (mean, across all concurrent requests)
Transfer rate: 37.95 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 19 19 0.0 19 19
Processing: 23 23 0.0 23 23
Waiting: 21 21 0.0 21 21
Total: 42 42 0.0 42 42
$
I needed to compare two files on a
CentOS Linux
system to find the lines in one file that didn't appear in the other. I.e., I
had a file bounced.txt with a list of email addresses that had experienced
bounced messages. Some, but not all of those email address were part of a
mailing list stored at /etc/mail/mailinglist.txt. I wanted to see only those
lines in bounced.txt that did not appear in mailinglist.txt. The
comm utility,
which is also present on Mac OS X
systems, allows you to compare two files and determine which lines occur in
one but not another file.
I was able to find the lines that appeared in bounced.txt, but not
mailinglist.txt with the following
comm command:
# comm <(sort /etc/mail/mailinglist.txt) <(sort bounced.txt) -13
bounce-600404@bounce.getaresponse.com
jasmith@example.com
You need to provide comm with sorted files for it to do its matching,
which is why I used the sort
command to sort the files before providing the contents of the two files
to the comm command. I included the -13 because normally comm
produces three columns of output as explained below in information from
the comm man page:
NAME
comm - compare two sorted files line by line
SYNOPSIS
comm [OPTION]... FILE1 FILE2
DESCRIPTION
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2, and
column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
When I attempted to execute a
Python script today on a CentOS Linux system from a shell
prompt with ./check.py, I received the following error message:
import: unable to open X server `' @ error/import.c/ImportImageCommand/369.
The first line of code I had in the file I was attempting to run was
as follows:
import json
It has been quite a while since I created a Python script, but the line
looked fine to me and I couldn't understand why the
JSON library
wasn't being imported, but, instead, the import command seemed to be producing
an error message. I believe that library has been available for use
with Python since Python 2.6 and the system on which I was attempting
to execute the script had Python 2.7.5 on it (you can find the version
from a shell prompt by issuing the command python --version).
Eventually I realized, I had forgotten to put the
shebang line as the first line in the file. The shebang line, which
starts with #! tells the shell, in this case the
Bash
shell, which program to use to interpret the rest of the file. When
I put the following line as the first line in the file, that fixed the problem.
#!/bin/python
I could have run the script successfully without that line, if I used
python check.py. But when I attempted to execute the
script from the command line without making it an argument to the python command, the shell
was interpreting the code, rather than Python.
If you are using SparkPost for email
delivery and wish to check message events, you can view message events
information using the
Wget utility, which is available for Linux, OS X, and Microsoft Windows
systems. The man page for the command on a CentOS Linux
system is here and the
home page for the utility is at
GNU Wget. Alternatively, for information on how to use
curl, instead, see
SparkPost - Addresses Associated With
Bounced Email.
To download message events information for the last hour using the SparkPost
application programming interface (API) with Wget, you can use a command
similar to wget https://api.sparkpost.com/api/v1/message-events?events=bounce,out_of_band --header="Authorization: my_API_key" --header="Accept:
application/json" where my_API_key is an API key provided to you
by SparkPost. However, if you haven't granted access to message events for
that key, you will receive a "ERROR 403: Forbidden" error as shown below.
The API key, which in this case is a dummy key, is provided by sending a
custom header that includes Authorization: my_API_key:
To grant a key permission to access message event data, log into your
SparkPost account at the SparkPost website, then click on Account,
select API Keys and for an existing or new API key check the check box
next to "Message Events: Read-only".
If you are using SparkPost for email
delivery, you might expect that you can determine which email addresses in
a mailing list resulted in bounced messages by logging into the SparkPost
website, clicking on Reports and then Bounces. But, though
that will give you a total number for bounced email messages and the
percentage of messages that bounced, and even the reasons email bounced, the
report doesn't identify the individual email addresses that caused email to
bounce. To see particular addresses that caused email to bounce, if you
click on Lists, rather than Reports, and then click on
Suppressions and check the check box next to Bounce Rule and
click on Search, you will see recipients email addresses listed that
triggered a bounced email.
I recently created a SparkPost account
to use SparkPost for smart host email delivery service for an organization's
monthly newsletter distribution by email. SparkPost provides a free level
of service that will allow one to send up to 100,000 messages per month.
I had switched back to another service, but when I discovered a problem with
deliveries through the other service yesterday, I reconfigured
Sendmail to
use the SparkPost
SMTP server as the smart host. To use the SparkPost SMTP
server, smtp.sparkpostmail.com, as the smart host, I had the following lines
in /etc/mail/sendmail.mc, but email was not reaching recipients.
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
define(`RELAY_MAILER_ARGS', `TCP $h 587')
define(`ESMTP_MAILER_ARGS', `TCP $h 587')
define(`SMART_HOST', `smtp.sparkpostmail.com')dnl
While troubleshooting an email delivery problem on a
CentOS 7 Linux
server running
Sendmail, I saw an unexpected entry when I checked the mail queue with
the mailq command.
The system was running
Apache, but I would not expect any email to originate from Apache destined
for a Yahoo
email address.
The contents of queued email are stored in the /var/spool/mqueue
directory. For a queued message there will normally be two files,
one beginning with the letters "df" and the other with the letters "qf",
containing the queue id, in this case u83BWu3X020476, as the
rest of the file name.
# ls /var/spool/mqueue/??u83BWu3X020476
/var/spool/mqueue/dfu83BWu3X020476 /var/spool/mqueue/qfu83BWu3X020476
#
Note: you will only be able to access these files from the root account.
When I was running Sendmail on a CentOS 5 server, I needed to use the
m4 command after modifying
/etc/sendmail.mc to rebuild /etc/sendmail.cf from
that file, i.e., m4 /etc/mail/sendmail.mc >
/etc/mail/sendmail.cf. E.g., see
Configuring Sendmail to
Use a Smart Host, but that is no longer needed with CentOS 7 and,
though I went from CentOS 5 to 7, may have gone away as a needed step
in CentOS 6. Now, if you modify /etc/sendmail.mc, when
you restart sendmail, e.g., with service sendmail restart,
the sendmail.cf file is automatically rebuilt.
I needed to print to a Konica Minolta bizhub 363
Multi-Function Device (MFD) from a MacBook Pro laptop running OS X Yosemite
(10.10.5). When I checked the system to see if there was already an appropriate
Konical Minolta printer driver present on the laptop, I did not see any
Konica Minolta printer drivers.
$ ls -l /Library/Printers/PPDs/Contents/Resources | grep -i Konica
$
So I searched for one at the Konica Minolta
Support & Downloads page. I downloaded the
BH423PSMacOS109_1100MU.dmg (10240 KB) file (you have to accept the license
agreement before you can download the file). If you double-click on the
downloaded file, in the OS X
Finder, you will see bizhub_423_10...
appear under Devices. If you click on that item, you will see two
files are contained in the
Apple Disk Image .dmg file: Readme_e.txt
and .devices_bizhub.png.
To install the driver, double-click on the .pkg file which will open a
"Welcome to the 423 Series PS Installer" window.