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
   
23 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

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