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
 
     
2017
Months
May


Sun, May 28, 2017 10:10 pm

Querying an SQLite Database With PHP

If you wish to query an SQLite database using PHP, you can do so by placing commands similar to those shown below within the code for a webpage:

<?php

$filename = "/Users/jasmith1/Documents/www/test/presidents.db";

$db = new SQLite3($filename);

$results = $db->query('SELECT * FROM Terms');
while ($row = $results->fetchArray()) {
    var_dump($row);
    echo "<br>\n";
}
?>

In the example above, the database location and file name is stored in the variable $filename. The file must be in a location accessible by the webserver and the file permissions must allow access to the file.

[ More Info ]

[/software/database/sqlite] permanent link

Fri, May 26, 2017 8:38 pm

Burning an ISO file to a disc under Windows 10

To burn an ISO image file to a disc under Windows 10 using capabilities built into the operating system, click on the .iso file in Windows File Explorer to highlight it. You will then see Disc Image Tools appear at the top of the window with Manage below it.

Click on Manage. You will then see options to Mount or Burn.

Click on Burn. A Windows Disc Image Burner window will appear where you can select the disc burner device, if there is more than one in the system. Click on the Burn button to burn the iso file to a CD or DVD.

When the .iso file has been burned to a disc, you should see a "The disc image has been successfully burned to disc" message and the disc should be ejected from the drive.

[ More Info ]

[/os/windows/win10] permanent link

Tue, May 23, 2017 10:36 pm

Checking speed and duplex settings on a Linux system

Sometimes network performance problems on a system can be due to a mismatch in the speed and/or duplex settings on a system and the switch or router to which it connects. Autonegotiation normally works to ensure that two connected devices have compatible settings, but occasionally it may not work as intended. On a Linux system, one way to check the spped and duplex values is by using the ethtool command. If the utility, which provides capabilities for querying and changing settings such as speed, port, auto-negotiation, PCI locations and checksum offload on many network devices, especially of Ethernet devices, isn't installed already you can install it on a Ubuntu Linux system with the command sudo apt-get install ethtool. On a CentOS Linux system, you can use yum install ethtool. You can run the software to show the settings for a network interface controller (NIC) by issuing the command ethtool devname where devname is the name associated with the network interface, e.g., you might issue the command ethtool eth0 on a Ubuntu system. You can see the available network interfaces using the command ifconfig -a. Below is the output of the command run on a CentOS system:

$ ethtool enp1s4
Settings for enp1s4:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Speed: 100Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	MDI-X: Unknown
Cannot get wake-on-lan settings: Operation not permitted
	Current message level: 0x00000037 (55)
			       drv probe link ifdown ifup
	Link detected: yes
$

[/os/unix/linux/utilities/network] permanent link

Sun, May 21, 2017 10:29 pm

Book Collector database disappeared

I use the Collectorz.com book database software to manage my book collection. I hadn't updated the database for several months, but I had purchased some books recently and wanted to add those books to the database. When I opened the Book Collector program (version 16.4.3), it automatically opened the last book database I had open, which was one that I use to track books my wife and I have purchased as gifts for a friend who also enjoys reading, so I don't buy the same ones again in the future. But when I tried to find the database in which I store information for my own books, I couldn't find it. When I clicked on File and selected Open Database in the program and navigated to a folder where I thought that database was stored, the program didn't show the database at that location. When I navigated to that directory with the Windows File Explorer, I didn't see any files with a .bkc extension, which is the filename extension used by the Book Collector database program. Collectorz.com also provides comic, game, movie, and music database programs.

[ More Info ]

[/software/database/collectorz] permanent link

Sat, May 20, 2017 8:24 pm

Finding open files on a Windows SBS server

If you need to find files open on a Small Business Server (SBS) system, e.g., perhaps files have been opened on the server from other computers in the windows domain, you can do so by taking the following steps:
  1. Click on Start
  2. Select Administrative Tools then select Computer Management and then, under Sytem Tools, click on Shared Folders
  3. Double-click on Open Files. You will then see the files open on the server from other systems. You will see the files being accessed, who is accessing them, the locks, if any, and the mode in which it files have been accessed, e.g., whether they are open only for reading or whether they are open in read and write mode. Right-clicking on a file will give you the ability to close the open file.

[ More Info ]

[/os/windows/commands] permanent link

Thu, May 18, 2017 10:08 pm

Batch file to ping several hosts and log results

Since a connectivity issue between a Windows XP system in another country and systems in the United States seemed to correlate with the time of day that connectivity attempts were taking place, I wanted to have a batch file that would periodically ping from the source to the destination hosts and record the results, so that I could determine if packet loss was occurring at particular times every day because of contention with other traffic. So I created the following batch file (pinghosts.bat):

@echo off

set pingCount=5
set timeOut=500
set dirPath=%HOMEPATH%\Documents

REM ping google.com, apple.com, and cisco.com
for %%i in ("216.58.217.142" "17.142.160.59" "72.163.4.161") do (
   if not exist %dirPath%\%%i.txt (
      systeminfo | find "Time Zone:" > %dirPath%\%%i.txt
   )
   echo. >> %dirPath%\%%i.txt
   echo %date% %time% >> %dirPath%\%%i.txt
   ping -n %pingCount% -w %timeOut% %%i >> %dirPath%\%%i.txt
)

[ More Info ]

[/os/windows/commands/batch] permanent link

Mon, May 15, 2017 11:30 pm

Zooming in and out in an email message in Outlook 20016

If the text is too small for you to read or you want to see more text in a given area while editing an email message in the Outlook email client in Microsoft Office 2016 on an Apple laptop, such as a MacBook Pro runing the OS X/macOS operating system, you can do so without changing the font size for text in the message by holding down the control key on the keyboard while scrolling up or down with two fingers on the touchpad. If you run two fingers downwards on the touchpad while holding down the control key, you will zoom in, enlarging the text, while if you run two fingers upwards on the touchpad, you will zoom out, making the text smaller.

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

Sun, May 14, 2017 10:55 pm

Running chkdsk from Windows File Explorer

You can run the Microsoft Windows chkdsk program from within the Windows File Explorer by right-clicking on the drive you wish to check and selecting Properties or with the drive selected, click on Properties from the tool bar at the top of the File Explorer window. Then click on Tools tab and then the Check button.

[ More Info ]

[/os/windows/filesystem] permanent link

Thu, May 11, 2017 10:38 pm

Firefox in Force Quit Applications, but not in Activity Monitor

Firefox stopped responding whenever I attempted to access a site. I could verify network connectivity to various sites with ping, but if I attempted to access a URL in the Firefox browser on my MacBook Pro running OS X El Capitan, Firefox (version 45.7.0) would not display any webpage. I've had this problem in the past; when it occurred, I would quit Firefox, sometimes using Force Quit Applications, which is available by clicking on the Apple icon at the top, left-hand corner of the screen and then selecting Force Quit and then selecting Firefox from the Force Quit Applications list of running applications and then clicking on the Force Quit button. When I did that today, I saw the message below as usual:

Do you want to force "Firefox" to quit?

You will lose any unsaved changes.

 

I clicked on Force Quit, but that seemed to have no effect. I closed and reopened Force Quit Applications and went through the same process numerous times, but no matter how many times I repeated the process, Firefox remained in the list of running applications that it showed.

[ More Info ]

[/os/os-x] permanent link

Sun, May 07, 2017 6:09 pm

Centering an image on a webpage horizontally

To center an image horizontally on a webpage, you can add style="display: block; margin: auto;" to the img tag. E.g.

<p> <img src="320px-Fisher_500_radio.jpg" alt="Fisher AM/FM radio from 1959" width="320" height="208" style="display: block; margin: auto;"> </p>

Fisher AM/FM radio from 1959

Related articles:

  1. Centering a div and an image within it using CSS

[/network/web/html/css] permanent link

Sat, May 06, 2017 10:55 pm

Installing Homebrew on Mac OS X

Homebrew is a free and open-source (FOSS) package management system that is available for OS X/macOS systems. Homebrew makes extensive use of GitHub to expand the support of several packages through user contributions. The software was written by Max Howell in 2009; as of July 2016 there was a team of twelve developers maintaining the software. You can install it by opening a Terminal window and issuing the command /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)". I recommend putting the sudo command at the beginning of the command, so you won't be prompted so many times to provide the password for your account during the installation, i.e., sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)".

[ More Info ]

[/os/os-x] permanent link

Fri, May 05, 2017 10:46 pm

Using MTR for network diagnostics

Traceroute and ping are commonly provided with operating systems as tools to diagnose problems in network connectivity between systems. Another very useful took, which combines the functionality of both those other tools is My traceroute, which was originally know as Matt's traceroute, aka MTR. The software is available for Linux systems and also for Microsoft Windows sytems as WinMTR.

The software can be installed via the package management system for some Linux distributions. E.g., it can be installed on a CentOS Linux system with yum using the command yum install mtr. You can check on whether it is installed on a CentOS system with the command rpm -qi mtr or you can just issue the command which mtr on a Linux system.

[ More Info ]

[/network/tools] permanent link

Tue, May 02, 2017 11:18 pm

Safari.app wants to use confidential information in your keychain

When I sat down at my MacBook Pro laptop running OS X El Capitan today, I saw the message below (image):

Safari wants to use your confidential
information stored in "A49A5BE4-6FB4-4399-9EB3-3DBA06717BEF"
in your keychain.

Do you want to allow access to this item?

       

The "A49A5BE4-6FB4-4399-9EB3-3DBA06717BEF" wasn't an identifier I recognized. If you see such a message, you can search for the identifier in the message using the Keychain Access application, which is located in the Applications/Utilities folder. After opening the program, click on Edit and then select Find. In the upper, right-hand corner of the window, you will see a field to the right of a magnifying glass icon where you can type the text for which you wish to search. I could type just part of the string, e.g. "A49A5" to locate the relevant entry.

[ More Info ]

[/network/web/browser/safari] permanent link

Mon, May 01, 2017 11:16 pm

Installing Wireshark on Mac OS X El Capitan

Wireshark is free and open-source software that provides packet capture and analysis capabilities. The software is available for Mac OS X/MacOS systems. An Apple Disk Image .dmg file can be downloaded from Download Wireshark. After downloading the .dmg file, double-click on it to open it. Inside the .dmg file you will see a .pkg file and a Read me first.rtf file.

Wireshark DMG file

Double-click on the .pkg file to start the installation.

[ More Info ]

[/os/os-x] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo