Sunday, June 10, 2012

Free Credit Report

A good credit score is important for securing loans or incurring other types of debt.

According to the Federal Trade Commission, the Fair Credit Reporting Act includes a provision whereby the big three credit reporting companies (Equifax, TransUnion, and Experian) must provide you, free of charge, a copy of your credit report annually.

The easiest way to get the ball rolling is to visit the official site, AnnualCreditReport.com, and fill out their form. 




Eventually you'll be forwarded to each credit reporting site, in turn, to input some answers to security questions. Then you can either view your report online, or download it in PDF form. You can also view the report in printer-friendly format, then use a free utility like Cute PDF Writer to "print" the report to a PDF file.

I had no idea one could obtain a completely FREE report of your credit history from the big three companies in this way, so score one for government working for the people.




Friday, June 1, 2012

Obtain Element Coordinates Using JQuery

I'm working on a project with ASP.NET and JQuery where I need to be able to obtain the coordinates for a div element in response to a button click. I found an example here, but I wanted to get not just the top and left values, but be able to obtain coordinates of all four corners.

To do this, I make use of JQuery's position, height, and width functions, then simply use some arithmetic to obtain the coordinates and finally display them. 

Here's an example. First, the markup:
<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

Div Coordinates





I am a div.

Now, the code behind: 

protected void Button1_Click(object sender, EventArgs e)
{
     Label1.Text = "Top Left: " + hfTop.Value + ", " + hfLeft.Value;
     Label2.Text = "Top Right: " + hfTop.Value + ", " + hfRight.Value;
     Label3.Text = "Bottom Left: " + hfBottom.Value + ", " + hfLeft.Value;
     Label4.Text = "Bottom Right: " + hfBottom.Value + ", " + hfRight.Value;
}



In a nutshell, the button click first triggers the OnClientClick event, which calls the JQuery functions to populate the values of the HiddenField objects. Then, the OnClick method takes those values and concatenates them in the code behind into coordinate pairs to display as the label text.
In cases where we need specific coordinates of each corner of a div element in response to a click event, this method works nicely.



Wednesday, May 30, 2012

Firefox Performance Problems

Lately I've noticed Firefox seems to be lagging as of the latest release of version 12. 

Since my earlier post regarding setting Firefox up to utilize CPU affinity in Windows, things have been manageable, but lately a familiar flavor of failure seems to have crept back into this latest release.

If I leave Firefox open and running overnight with my usual group of a dozen or so tabs open, as soon as I resume activity in the morning, I notice in Task Manager that Firefox has one of my system's CPU cores at 100% usage, and has well over 1.7 GB of system memory in use, far more than what typically ranges from 400 to 700 MB on an average day.

Any given morning, thanks to Firefox.

More often than not, once I clear this CPU usage spike by ending the firefox.exe process, when I reopen Firefox I'm greeted with tabs notifying me of add-on updates that have been applied. 


This same issue seemed to be absent as of, say, version 10, but appears to have recently reemerged, at least in my experience on several different PCs running Windows 7.

A common thread among established users on the Firefox support forum points to the various add-ons users have installed. Clearly, many of them say, this is the culprit, and the often the user is advised to open Firefox sans add-ons and attempt to reproduce the problem by enabling add-ons one by one and testing after each to determine which might be the culprit.

I have no desire to invest the time and effort in something that I think developers and analysts at Mozilla should be hammering out themselves. It seems that if you release a platform on which users will develop add-ons, there should be safeguards in place to prevent poor coding from disrupting the integrity of the browser's functionality.

That being said, if you have a 64-bit system, consider trying out Waterfox, a Firefox build which emphasizes performance and speed, and mitigates a lot of whatever lurks in Firefox's codebase that might be causing this excessive memory usage and lag.

Perhaps it's some insidious conspiracy to make it so that when your computer is otherwise asleep at night, Firefox will rear its head and ramp up CPU usage and therefore power consumption, making an impact, however small, on world oil prices, driving up costs and compelling people to bite the bullet and get off the grid with their own solar, wind, nuclear, or other alternative power source.

I've had crazier ideas!




Saturday, May 12, 2012

Magnets, How They DO Work

Love bug season has descended unexpectedly early here in north central Florida.

Love bugs love lovin' at our expense.
 
Swarms of these annoying insects, male and female joined at the butt, fly adrift, ready albeit unwilling to let themselves be splattered at high speed against the finish of your car. Given time and accelerated by summer heat, their acidic gut chemistry can pit the paint and fill the delicate fins of your radiator with bug parts.



An easy, somewhat ghetto measure can be taken to protect the radiator and engine compartment from these annoying insects. All you need is some plastic screening material, a dead hard drive, and scissors.

I drive a minivan, so I don't much care about its finish, I'm more concerned about function than form. In my case, I just cut a swatch of plastic screening material large enough to cover the radiator openings in the front grille, then secured it at either top corner with a rare-earth magnet salvaged from a long-dead hard drive.



The few inches of overlap will allow the screen to stay draped over the grille openings while driving, as will the curve of the grille itself. A masochist might go so far as to have a wire mesh complete with some power running through it to act as a mobile bug zapper and decrease the bug population, but I lack the motivation and time to go that far, I'm content to just keep them out.

Now my engine can remain bug free, without compromising airflow the engine needs so that the radiator can dissipate heat on the road.