MoonPoint Support Logo

 

Click here for the Best Buy Weekly Specials



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


Sun, May 20, 2012 5:07 pm

Excel Defined Name

Microsoft Excel provides the capability to assign a "defined name" to a cell or range of cells to make it easier to understand the purpose of a cell or group of cells. E.g, TaxRate is more meaningful in a formula than E21. Defined names also allow you to ensure that hyperlinks pointing to locations in a spreadsheet are updated appropriately when a spredsheet is modified.

[ More Info ]

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

Fri, May 18, 2012 11:37 pm

Port Forwarding RDP With PuTTY

You can use PuTTY, which is a free implementation of Telnet and SSH clients for Windows and Unix platforms to log into a system via SSH and by using the SSH port forwarding functionality that PuTTY provides, establish a Remote Desktop Protocol (RDP) connection through a "tunnel" you establish via the SSH connection.

[ More Info ]

[/os/windows/network/ssh/putty] permanent link

Sat, May 12, 2012 4:16 pm

Keep Header Row Visible in Excel When Scrolling

If you have an Excel spreadsheet with many rows, you may want to keep the header row visible even when you scoll far down through the rows of the spreadsheet, so you know what the values in each column represent. This can easily be done, if you have headings for each column in the top row of the spreadsheet, or near the top row, by going to the top of the spreadsheet, so that the header row is the top row of the Excel window. Then click on the cell in column A just below the header row to make it the current cell. Then click on Window and select Freeze Panes. Now, when you scroll down through the spreadsheet, the header row will "float" at the top of the Excel window, so that it is always visible and you don't have to scroll back to the top again to remind yourself what data is found in each column. If you have other rows above the column heading row you selected, those will remain visible as well as everything above the row you were on when you selected Freeze Panes.

If you later want to turn the display of the header row or rows when you scroll through the spreadhseet, click on Window and select Unfreeze Panes.

Note: this works in Microsoft Excel 2000 and later on Microsoft Windows systems and Microsoft Excel 2008 for Mac and should work on other versions of Excel as well.

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

Sat, May 12, 2012 2:25 pm

Determining the Package for a File on a Ubuntu Linux System

To determine which installed package provides a file on a Ubuntu Linux system, you can use the command dpkg -S filename. If you need a particular file, but the package providing it is not installed, you can install the apt-file package and then use the command apt-file search filename to determine which package or packages provide it.

[ More Info ]

[/os/unix/linux/ubuntu] permanent link

Thu, May 03, 2012 10:58 pm

Time and Date Issue and mDNSResponder and configd messages

When I started a MacBook Pro laptop this morning, I found the date was set set to December 31, 2000, though it had the correct date the day before. I also received messages asking whether I wanted to allow configd and mDNSResonder to accept incoming network connections. I believe those messages appeared because the signing certificates for the two applications no longer appeared valid to the system because their signing dates were after the December 31, 2000 date the system was showing.

[ More Info ]

[/os/os-x] permanent link

Sun, Apr 22, 2012 4:01 pm

Sumif for Date Range

Microsoft Excel's Sum function allows you to sum the values in a column. E.g., if I have a column, column J, that contains revenue in dollars for items sold with the first entry in row 4 and the last entry in row 62, I could use the formula =SUM(J4:J63) to calculate the total revenue for all items (I use "63" instead of "62" presuming that new entries will continue to be added by inserting new rows above row 63). But, if you wanted to determine the revenue just for the current month, presuming the month is April 2012, you could use the sumif function, e.g., assuming the date of sale for each item is in column F, I could use the formula =SUMIF(F4:F63,">=2012-04-01",J4:J63) to calculate the revenue for any items sold on or after April 1, 2012, presuming that I am still in the month of April 2012. In this case any row that has a date value of April 1, 2012 or later in column F will have the sales amount in column J for that entry added to the total sales calculation for April. I could also have used "01-Apr-12" for the date value in the formula, if I wished, instead of "2012-04-01", i.e., I could use YYYY-MM-DD where YYYY is the year, MM is the two digit value for the month and DD is the two digit value for the day or DD-Mon-YY, where Mon is the 3 letter abbreviation for the month.

Presuming that the only entries on the worksheet are for the year 2012, I could find the total sales for January using the formula =SUMIF(F4:F63,"<=31-Jan-12",J4:J63). But, if I want to determine the sales for February, I need to add only entries where the date is between February 1, 2012 and February 29, 2012. One simple way to do so that will work even for older versions of Excel, such as Microsoft® Excel 2000, is to perform one SUMIF calculation for all the values greater than or equal the starting date and then subtract from that total the value calculated using another SUMIF formula that adds all the values where the date is greater than the ending date. E.g., if I wanted to determine the total revenue for February, I could use the forumla below:

=SUMIF(F4:F63,">=2012-02-01",J4:J63)-SUMIF(F4:F63,">2012-02-29",J4:J63)

The first SUMIF adds the sales amount in column J whenever the date value in column F is greater than or equal February 1, 2012. The next SUMIF adds the sales amount in column J whenever the date value stored in column F is greater than the last day in Feburary of 2012, which is February 29, 2012. The result of the first SUMIF will be the total for all entries on or after February 1, 2012. The result of the second SUMIF will be the total for all entries after February 29, 2012. The difference between those two values will be the total for all sales in the month of February 2012.

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

Thu, Apr 19, 2012 5:57 pm

Creating a Bootable Uuntu USB Flash Drive from an OS X System

If you wish to create a bootable USB flash drive using Ubuntu Linux from a Mac OS X system, you can take these steps.

[/os/unix/linux/ubuntu] permanent link

Thu, Apr 12, 2012 10:39 pm

Mac OS X Hibernate Mode

Mac OS X provides a hibernation feature, which allows you to save the current state of the system to memory or the hard drive. You might wish to use this feature if you are going to be away from the system for awhile and don't want to close all of the applications you have open or you can't power the system from a wall electrical outlet and wish to conserve battery power.

OS X supports five different hibernate modes. The default mode is "3", which means when you put the system to "sleep" it saves the current state of the system to Random Access Memory (RAM), blanks the display, and goes to a low power consumption state.

You can determine the current hibernate mode by opening a Terminal window (use the Finder to go to Applications then Utilities then double-click on Terminal) using pmset -g | grep hibernatemode.

$ pmset -g | grep hibernatemode
 hibernatemode	3

You can change the hibernation mode by using sudo pmset -a hibernatemode n where n is one of the above integers representing a supported hibernation mode. E.g., to write the current state of the system, which includes the open applications and files in memory, to the hard drive and completely shut down the system, you can set the hibernatioon mode to 1. This is akin to hibernate mode on a Microsoft Windows system.

$ sudo pmset -a hibernatemode 1
Password:
$ pmset -g | grep hibernatemode
 hibernatemode	1

To put the system in hibernation, you can click on the Apple icon in the upper, left-hand corner of the screen and select Sleep. The system will then be put in the selected hibernate mode.

References:

  1. Does Mac OS X support hibernation?
    superuser

[/os/os-x] permanent link

Thu, Apr 12, 2012 9:50 pm

Copying a Disc with Burn under Mac OS X

The Disk Utility application that comes with Mac OS X, at least as of OS X 10.6 ,aka Snow Leopard, does not permit one to copy an audio CD. An alternative application that can be used to create an .iso file from an audio CD is Burn, which is free software licensed under the GNU General Public License (GPL) .

[ More Info ]

[/os/os-x/software/utilities/cd-dvd] permanent link

Wed, Apr 11, 2012 10:48 pm

Show the list of installed packages on a Ubuntu system

To display the list of installed packages on a Ubuntu Linux system from a shell prompt, you can use dpkg --get-selections. You can also use the Ubuntu Software Center, if you prefer a GUI method of checking.
$ dpkg --get-selections | more
accountsservice					install
acl						install
acpi-support					install
acpid						install
adduser						install
adium-theme-ubuntu				install
aisleriot					install
alsa-base					install
alsa-utils					install
amazonmp3					install
anacron						install

If you only want to determine whether a paricular package is installed, you can use grep to filter the results.

$ dpkg --get-selections | grep libboost
libboost-filesystem1.46.1			install
libboost-serialization1.46.1			install
libboost-system1.46.1				install

You can find the locations for the files installed when the package was installed by using the -L option with dpkg

$ dpkg -L libboost-filesystem1.46.1
/.
/usr
/usr/lib
/usr/lib/libboost_filesystem.so.1.46.1
/usr/share
/usr/share/doc
/usr/share/doc/libboost-filesystem1.46.1
/usr/share/doc/libboost-filesystem1.46.1/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/libboost-filesystem1.46.1
/usr/share/doc/libboost-filesystem1.46.1/NEWS.Debian.gz
/usr/share/doc/libboost-filesystem1.46.1/README.Debian.gz
/usr/share/doc/libboost-filesystem1.46.1/changelog.Debian.gz

To obtain information regarding a package, including its description, you can use the -s or --status option followed by the complete package name.

$ dpkg -s libboost-filesystem1.46.1
Package: libboost-filesystem1.46.1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 208
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Source: boost1.46
Version: 1.46.1-5ubuntu2
Depends: libboost-system1.46.1 (>= 1.46.1-1), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1)
Description: filesystem operations (portable paths, iteration over directories, etc) in C++
 This package forms part of the Boost C++ Libraries collection.
 .
 The Boost Filesystem Library provides portable facilities to query and
 manipulate paths, files, and directories.  The goal is to
 facilitate portable script-like operations from within C++ programs.
Homepage: http://boost.org/libs/filesystem/
Original-Maintainer: Debian Boost Team <pkg-boost-devel@lists.alioth.debian.org>

[/os/unix/linux/ubuntu] permanent link

Tue, Apr 10, 2012 8:00 am

Memory for Asus P4P800-E

I installed two additional memory modules in an ASUS P4P800-E motherboard. The motherboard has 4 memory slots that take DDR1 memory modules. The system had two 1 GB memory modules already installed. I installed two additional 1 GB memory modules giving the system 4 GB of RAM, which is the maximum amount of memory the P4P800-E motherboard will support. I used Corsair VS1GB333 memory modules. After I installed the additional memory, I used the free MemScope Memory Tester software to test all of the memory in the system. I let the test run over night for six complete passes and part of a seventh pass with no errors found.

Note: you can download the MemScope Memory Tester software here. At the moment there is a missing image on the page that has a link associated with it for downloading the software. The link appears immediately below the "Test 7 Random Data Sequence Test" paragraph or you can click here to access the form you need to fill out to download the software.

[/pc/hardware/motherboard] permanent link

Thu, Apr 05, 2012 7:57 pm

Recovering Lost Photos with DEFT Linux and PhotoRec

DEFT Linux can be used for forensics examination of a disk drive or to recover deleted or otherwise lost files from a disk drive. If you have lost files on a device, such as a memory card from a camera, perhaps because you accidentally deleted them, you can use DEFT and the PhotoRec utility that comes with DEFT 7 to search for and recover those files. PhotoRec 6.13 comes with DEFT 7. PhotoRec was created by Christophe Grenier. It is also available for Mac OS X and Microsoft Windows systems.

[ More Info ]

[/os/unix/linux/deft] permanent link

Fri, Mar 30, 2012 3:29 pm

National Do Not Call Registry

If you, like me, don't like receiving telemarketing calls and live in the U.S., the federal government maintains a "National Do Not Call Registry" that telemarketers are supposed to refer to before calling phone numbers. If a telephone number is on the list, the telemarketer is not supposed to call the number. You can add your phone number to the list by pointing your web browser to the National Do Not Call Registry website.

Unfortunately, some telemarketers ignore the list. If they do, you can file a complaint at the complaints page. You will be asked to provide the number that was called, the approximate time of the call, and the calling number, which you may be able to get by Caller ID or by hitting *69 on your phone immediately after the call has ended to get the time of the last incoming call. You will also be asked to provide the name of the company, if you know it.

I received an automated call today telling me I hadn't responded to prior offers to reduce my credit card rate and this would be my last chance. I hit "1" on the phone to speak to someone. When I asked for the name of the company I was told it was "Branch Card Services", which is probably not the real name of the company for which the telemarketer or scam artist I spoke to works. When I asked where the company was located, he immediately hung up. I hit *69 on my phone and found the number from which he was calling was 971-220-1771. I then went to the National Do Not Call Registry website and filed a complaint, since my phone numbers have been on that list for years. A company that ignores the list is subject to being fined by the government for ignoring the "do not call" list.

When I looked up the number on the Intelius reverse phone number lookup site, I found the location for 971-220-1771 listed as Gresham, Oregon. Of course, such companies can employ Caller ID spoofing techniques to hide the true number from which they are calling, so the number you obtain from Caller ID or *69 isn't guaranteed to be the number from which the call was placed.

You might wonder who would be foolish enough to provide a credit card to someone who calls when you have no means of verifying the caller's identity and no way of knowing if he isn't just a scam artist collecting credit card numbers to sell to others or use himself. Obviously, such calls must work, though, since I often receive them. I can usually get the person on the other end of the line to give me a company name, all of which have sounded rather dubious. Sometimes, I can even get the person to give me the location from which he or she is calling. In one instance, when I told the person that I shouldn't be getting such calls because I'm on the "do not call" list, she asked me how she could get on the list; I told her to go to donotcall.gov.

[/phone] permanent link

Fri, Mar 23, 2012 5:37 pm

Redirecting a Local Drive with Remote Desktop

The Remote Desktop Protocol (RDP) is a protocol developed by Microsoft that allows one to remotely manage a Microsoft Windows system. E.g., you could remotely manage a Microsoft Windows XP PC, Windows Server 2003 system, etc. from another Microsoft Windows system. There are also RDP clients that run on Linux, Solaris, and Mac OS X systems that will allow you to manage a Microsoft Windows system from a system running one of those operating systems.

A program that can be run on one of those operating systems is rdesktop. If you have a Linux system, you may find that it is already installed. If not you can download and install it for free.

You can determine if rdesktop is already installed by using the command which rdesktop.

$ which rdesktop
/usr/bin/rdesktop

Rdesktop allows you not only to remotely manage a Microsoft Windows system, but also map a directory on the system running rdesktop to what appears to be a shared network drive on the Microsoft Windows system.

$ rdesktop -0 -r 'disk:Linux=/home/jdoe/Documents/' -u administrator 192.168.0.5

I used the following options with the rdesktop command issued on a Ubuntu Linux system:

-0

The -0 option allows you to attach to the console of the server (requires Windows Server 2003 or newer), which would be akin to sitting down at the system to which you are logging on, i.e., it doesn't establish a session separate from the login session you would get when sitting at the system. So, if you were already logged into the system locally, when you connect remotely via rdesktop, you will see all of the open programs and files.

-r disk:<sharename>=<path>,...

Redirects a path to the share \\tsclient\<sharename> on the server (requires Windows XP or newer). The share name is limited to 8 characters.

In this case I used -r 'disk:Linux=/home/jdoe/Documents/'. I picked "Linux" for the sharename, but you can use whatever name you like. The name you select is the name the Microsoft Windows system will see for a shared network drive. The /home/jdoe/Documents/ means that if, from the Microsoft Windows system, I use the Explorer or an application to browse to the shared network drive named Linux it is really pointing to /home/jdoe/Documents on the Linux system. So I can place a file in /home/jdoe/Documents/ on the Linux system and access it from the Microsoft Windows system. Or I can save a file with an application on the Microsoft Windows system to the directory /home/jdoe/Documents on the Linux system.

-u <username>

The -u option allows you to spcify the Username for authentication on the Microsoft Windows system to which you wish to logon. In this case, I'm logging in as the administrator.

The 192.168.0.5 is the IP address of the Microsoft Windows system to which I wish to connect. You can also use a fully qualified domain name (FQDN) as well, e.g., a.example.com.

[/os/windows/software/remote-control/rdp] permanent link

Fri, Feb 24, 2012 4:10 pm

JavaScript Language Versus Type Attribute

After updating an old webpage, I validated the HTML on the page with the W3C Markup Validation Service. One of the errors reported for the page was the following one:

Error image - white x in red circle Line 19, Column 30: required attribute "TYPE" not specified

<script language="JavaScript">

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type= "text/javascript" for <script>.

In the head section of the HTML code, I had the following line:

<script language="JavaScript">

I didn't realize that the language attribute has been deprecated in favor of the type attribute. According to a posting I found at HTML Script tag: type or language?

The language attribute has been deprecated. Both will work in pretty much all browsers, but the first better adheres to modern standards.

The javascript code on the page was working as expected when I viewed the page with a browser, but I changed the line to the one below:

<script type="text/javascript">

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

Fri, Feb 17, 2012 9:36 pm

Viewing Message Headers in Hotmail

For Hotmail email accounts, I've posted the steps for viewing an email message's headers, which can provide information about the true orgination point, for an email message here.

[/network/email/hotmail] permanent link

Tue, Feb 07, 2012 11:25 am

Connecting to a Wireless Network with OS X

I've provided instructions here for connecting to a wireless network from a Mac OS X laptop.

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

Sat, Feb 04, 2012 9:45 pm

Microsoft Windows Live Messenger Winks .dt2 Files

Microsoft Windows Live Messenger, at least with version 2009, stores a Flash file within a .dt2 file associated with a "wink". The .swf file provides the animation associated with a wink. The .swf file can be extracted from the .dt2 file using Microsoft's expand utility.

[ More Info ]

[/network/chat/live_messenger] permanent link

Sun, Jan 29, 2012 10:03 pm

Customizing the Start Menu on a Windows 7 System

To change the items that appear when you click on the Start button Start button on a Windows 7 system, take the following steps:
  1. Right-click on the Start button.
  2. Select the Start Menu tab.

    Start Menu tab

  3. Click on the Customize button.
  4. You can then select which items, such as "Computer", "Documents", etc. that you wish to be displayed.

    Customize Start Menu

    If you want to use the default settings, click on the button labeled Use Default Settings. E.g., you might want to choose that option if some items have disappeared from the Start Menu. The default settings are listed below:

    Computer (default: "Display as a link)
    Connect To (default: checked)
    Control Panel (default: "Display as a link")
    Default Programs (default: checked)
    Devices and Printers (default: checked)
    Documents (default: "Display as a link)
    Downloads (default: "Don't display this item")
    Help (default: checked)
    Highlight newly installed programs (default: checked)
    Homegroup (default: unchecked)
    Music (default: "Display as a link")
    Network (default: unchecked)
    Personal folder (default: "Display as a link")
    Pictures (default: "Display as a link")
    Recent Items (default: unchecked)
    Recorded TV (default: "Don't display this item)
    Run command (default: unchecked)
    Search other files and libraries (default: "Search with public folders")
    Search All Programs menu by name (default: checked)
    System administrative tools (default: unchecked)
    Use large icons (default: checked)
    Videos (default: "Don't display this item)

    Start menu size

    Number of recent programs to display (default: 10)
    Number of recent items to display in Jump Lists (default: 10)

  5. When you are finished click on OK then OK again.

[/os/windows/win7] permanent link

Sun, Jan 29, 2012 7:59 pm

Redirection to Rogue rr.nu Site

While searching for a power adapter, I found a link for the part number of the power adapter for which I was searching that redirected me to www2.smartouholder.rr.nu. That site displayed a fake virus scan (see image), which reportedly was finding malware on the system from which I was searching, but was really just a ruse to try to lure unsuspecting users into buying rogue antivirus software, i.e., scareware. If I tried to navigate away from the site, I would receive a "Are you sure you want to navigate away from this page?" message.

Scareware - are you sure

No matter which option I selected from "OK" or "Cancel", I was left at the scareware webpage. After finally getting back to a prior Google search page, I checked the site's reputation at Norton™ Safe Web. It did not list the site www2.smartouholder.rr.nu, stating it had not been tested yet, but it did list rr.nu.

Norton Safe Web reported the following for the rr.nu site:

rr.nu

Summary

Computer Threats:
1
Identity Threats:
0
Annoyance factors:
0
Total threats on this site:
1
 
 
Community Reviews:
5

Norton Safe Web listed "Drive-By Downloads" as the threat from the site.

After I was able to navigate away from the site, I added an entry to the /Windows/system32/drivers/etc/hosts file to ensure that the system would not be able to contact the site again. I put the following 2 lines at the bottom of that file:

# Inserted on 2012-01-29. Site is attempting to download rogue antivirus software
127.0.0.1 www2.smartouholder.rr.nu

When a Windows system attempts to find an IP address for a website name, such as www.example.com, it will first check the hosts file to see if an IP address is listed there for the fully qualified domain name. If not, then it will perform a Domain Name System (DNS) query to obtain the IP address associated with the name. By associating the name with 127.0.0.1, which is the loopback address for the local system, you can ensure that a system on which the entry has been put in the hosts file will see the name as pointing to its own address and thus will never be able to reach the actual site.

Note: if you edit the hosts file with the Windows Notepad editor, be sure you save the file as hosts, not hosts.txt. The file may be marked as read-only, also, so in order to save the file. you will need to take off the read-only attribute temporarily and put the attribute back on after you have saved the file. You can do so by right-clicking on the hosts file, choosing Properties and unchecking the read-only attribute. Or you can use the following two commands from the command line to take the attribute off the file and put it back on after you've edited the file.

attrib -r C:\Windows\System32\drivers\etc\hosts
attrib +r C:\Windows\System32\drivers\etc\hosts

You will need to run the commands from an administrator account to do so. You will also need to run Notepad from an administrator account to edit the file. If you are logged in as another user, you can use the "runas" command from the command line to run Notepad or the attrib command from the administrator account.

E.g., you can use runas /user:administrator cmd to open another command prompt under the administrator account to run the attrib commands or runas /user:administrator notepad to run Notepad from the administrator account. Alternatively, for the attrib command you could use runas /user:administrator "attrib -r C:\Windows\System32\drivers\etc\hosts". If you are using a domain administrator account you would use runas /user:domainname\administrator.

[/security/malware] permanent link

Mon, Jan 16, 2012 12:59 pm

Floating Left and Right Columns Within a Div

I wanted to have two columns on one section of a web page where the fist column was all left-aligned on the page, but the second column was aligned to the right of the page.

I used the DIV tag to create the two columns. I used <div style="float: left;"> for the left columan and <div style="float: right;"> for the right column. I enclosed both of them in an outer DIV. Since I wanted to have a top margin of 75 pixels for the outer DIV to separate it from the material above, I used <div style="margin-top: 75px;"> for it. But when I viewed the page, the material in the two columns wasn't appearing the way I wanted it to appear. I then tried adding overflow: auto to the outer DIV as shown below.

<div style="margin-top: 75px; overflow: auto;">

<div style="float: left;">
Stuff in left column
</div>

<div style="float: right;">
Stuff in right column
</div>

</div>

<p>Stuff below</p>

That looked fine when viewed in Firefox, but Internet Explorer showed the "stuff below" between the two columns.

I was able to resolve the problem by inserting a complete "cleared" element last in the container as explained at How To Clear Floats Without Structural Markup By adding another DIV below the two column DIVs but within the outer DIV, I was able to get the results I wanted in both Internet Explorer and Firefox. That DIV was just <div style="clear: both;"></div>.

So I then had the following HTML code for the page.

<div style="margin-top: 75px; overflow: auto;">

<div style="float: left;">
Stuff in left column
</div>

<div style="float: right;">
Stuff in right column
</div>

<div style="clear: both;"></div>

</div>

<p>Stuff below</p>

References:

  1. 2 Column Div float right and left child divs outside parent
    Date: August 31, 2010
    Stack Overflow
  2. How To Clear Floats Without Structural Markup
    By: Big John
    Created May 14, 2004
    Last updated: July 2, 2008
    Position Is Everything

[/network/web/html] permanent link

Sun, Jan 08, 2012 6:34 pm

MySQL Field Types

I can't remember the ranges for various MySQL numberic data types, such as TINYINT, SMALLINT, MEDIUMINT, INT, etc. nor how many characters a TEXT field hods versus a MEDIUMTEXT field and when I need the information it sometimes takes me a little while to find it again, so I've placed a page listing those values on this site for ready reference.

[ More Info ]

[/software/database/mysql] permanent link

Sat, Jan 07, 2012 9:54 pm

Displaying Data from a MySQL Database with PHP

If you have data stored in a MySQL database that you wish to include on a webpage, PHP provides a mechansim to query a MySQL database to extract and dispaly the data on a webpage.

[ More Info ]

[/languages/php] permanent link

Thu, Jan 05, 2012 6:40 pm

Google Chrome for the Mac

Google Chrome is available for Mac OS X systems at http://www.google.com/chrome/index.html?platform=mac&hl=en. It is available in Apple Disk Image format, i.e., .dmg format as googlechrome.dmg.

The following window opens when you click on the .dmg file.

Running Google Chrome from dmg file
Create your own custom iPad case

If you double-click on the folder icon in the window, you will have the option of selecting where Chrome should be insalled. The default location is the Applications folder where applications are normally stored. When you then double-click on the "Google Chrome" icon in the window, you will have the option of installing the software or running it from the disk image.

Running Google Chrome from dmg file

If you don't want to intall it, you can simply run it from the disk image, since it will then be "mounted" as a drive within the Finder

Google Chrome browser under Mac OS X

[/network/web/browser/chrome/os-x] permanent link

Wed, Jan 04, 2012 11:05 pm

Removing Specific Cookies from Firefox

Firefox allows you to remove all HTTP cookies, cookies for one particular site, or even individual cookies associated with a particular site which may have placed multiple cookies on your system. To remove cookies, follow the process below.

Note: this procedure was written for Firefox 3.6, but may apply to other versions as well.

  1. Open Firefox.
  2. Click on Tools and select Options.
  3. Click on Privacy.
  4. There will be a "remove individual cookies" link in the middle of the Options window; click on it.

    Firefox Remove Individual Cookies

  5. Search or scroll through the list until you find the relevant website. You can search on a domain name, e.g., example.com.
  6. If you want to delete all cookies for a particular website, highlight its entry by clicking on it, then click on the Remove Cookies button. If yo wish to remove only certain cookies for a website, click on the rightward pointing triangle next to it or double-click on the entry to reveal the individual cookies associated with the website. Click on one you want removed to highlight it, then click on the Remove Cookie button.
  7. Click on the Close button when you have removed all the cookies you wish to remove.
  8. Click on the OK button to close the Options window.

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

Sun, Jan 01, 2012 1:55 pm

Resizing an image from the command line

If you have the ImageMagick package installed on a Linux system or Mac OS X, you can use the convert tool that comes with it to resize an image from a shell prompt. ImageMagick is also available for Microsoft Windows systems, but I haven't tried it on a Microsoft Windows system.

To resize an image, one uses the -sample option for the convert tool as in the example below, which resizes an image, input.jpg, to 80 pixels wide and 40 pixels high, storing the result in output.jpg.

$ convert -sample 80x40 input.jpg output.jpg

You can also specify percentages of the original file size rather than a size in pixels.

convert -sample 25%x25% input.jpg output.jpg

Note: when you use the -sample option to specify the size of the output image in pixels, you may not get the exact sizes you specified for the width and height of the image. This is because ImageMagick considers the aspect ratio of the two sides of the image when it is resizing, keeping the aspect ratio of the new image the same as that of the previous image. So one of the values may not be the same as the number you put on the command line.

You can use the identify utility that comes with ImageMagick to obtain the width and height of an image (the width value is displayed first followed by the height).

$ identify example.png
example.png PNG 100x89 100x89+0+0 DirectClass 11kb

In the example above, the image is 100 pixels wide by 89 pixels high.

You can determine if ImageMagick and these associated tools are on the system by using the which command.

$ which identify
/usr/bin/identify
$ which convert
/usr/bin/convert

References:

  1. Graphics from the command line
    Flip, size, rotate, and more with ImageMagick
    By: Michael Still, Senior software engineer, Tower Software
    Date: July 16, 2003
    Linux - Technical resources for Linux programmers and system administrators

[/software/graphics/imagemagick] permanent link

CompuVest - Notebooks Online training 10% Off one year subscription with code 10PERCENTOFF

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo