Saturday, November 17, 2012

Replace Keyboard for HP Envy17 3D

WHY I'M WRITING THIS:

I recently had to replace the keyboard on my HP Envy17 3D, and couldn't find instructions on the Internet for how to do it. I found some instructions in a video for a computer that was similar, though, and was able to figure it out. I'm posting pictures here so that if you have to do the same thing, you won't have to experiment as much as I did.


DISCLAIMER:


***WARNING: I am NOT a computer technician, and I am providing the information below simply to help you out. I claim no responsibility if you break your computer.***


SUPPLEMENTAL MATERIALS:


After writing most of this post, I dug through my email and found a link to instructions online. They're pretty good; look at them first, and check out my images below if you need additional help. The keyboard instructions start on page 50:

http://h10032.www1.hp.com/ctg/Manual/c02772484.pdf

There were also a couple of YouTube videos that I watched before attacking this. They're a bit long and contain a lot of information you don't need to know, but gave me some important details. They're also for an Envy of a different size with a design that's different, but, for what they're worth, here they are. The second one is probably more useful:

http://www.youtube.com/watch?v=aDxQ87QGxow

http://www.youtube.com/watch?v=l56Jr0nF3go


THE INSTRUCTIONS

Just to make sure, here's the computer I'm talking about:





Here are the steps to replacing the keyboard:

1) Turn the computer off.

2) Turn the computer upside down.

3) Remove the battery. Hopefully this is something that you do regularly to extend its life, but just in case, I've included a red arrow pointing at the battery release in the picture below.

4) Remove the compartment in the middle of the computer. Even though the image below shows more than that removed because I didn't know what had to be removed, only that compartment and the battery should need to be removed.



5) Remove the 4 screws circled in yellow in the image above. Only these screws need to be removed. They correspond to the 4 holes on the back of the keyboard, also circled in yellow, on the keyboard image below.




6) Remove the keyboard from the top of the computer. This is accomplished simply by carefully slipping a slim object, such as a very small screwdriver, between the edge of the keyboard and the rest of the top case of the computer. The keyboard snaps into and out of place, so once you've gotten a hold underneath the keyboard a little bit, carefully lift along the keyboard at various points to get it to snap out.
There are a couple of ribbons used to connect the keyboard to the computer, so be careful with the little clips that hold those in place.

Here's what the (broken) keyboard looks like from the top:



7) Place the new keyboard and reattach everything. Attach the ribbons where they belong. Screw the screws into the new keyboard. Replace the middle compartment.

You're good to go. Good luck :)

Wednesday, October 29, 2008

Variable converter from camelCase to under_score

I had to write this for work and then we ended up taking care of the code a different way. Didn't want to lose it. This util converts Strings (variable names) from camelCase to under_score, since the underscore way was how the php backend preferred it. I know the formatting is messed up; just copy and paste it; it has to do with the sizes of the tabs. Enjoy!

package utils
{
/**
* This class for converting variables from camelCase to underscore_vars or vice versa.
*/
public class VariableConverter
{
//-----------------------------------------------------------------------------------------
//
// Variables
//
//-----------------------------------------------------------------------------------------

/**
* The character codes for the letters 'A' and 'Z'.
*/
protected static const A:uint = 65;
protected static const Z:uint = 90;

/**
* If 'camelToUnder' == true, convert the variable name from camelCase to under_score
* format, else vice versa.
*/
public static function convert(value:String, camelToUnder:Boolean = true):String
{
// The var 'camelToUnder', when true, specifies that this function
//-- treat incoming vars as camelCase for converting to underscore format. If set to
//-- false, incoming vars are converted from underscore format to camelCase.

for (var i:uint = 0; i < value.length; i++)
{
// Find the index of each significant character: a capital letter if
//-- 'camelToUnder' == true, and an underscore if false. Splice what happened
//-- before the character to the altered or deleted character and what
//-- should come after it.

var str:String = value.charAt(i);
if (camelToUnder && str.charCodeAt(0) >= A && str.charCodeAt(0) <= Z)
{
var beginning:String = value.substring(0, i);
var ending:String = value.substring(i + 1, value.length);
value = beginning + '_' + str.toLowerCase() + ending;

// Add to 'i' because the String is longer, now.
i++;
}
else if (!camelToUnder && str == '_')
{
beginning = value.substr(0, i);
ending = value.substr(i + 2, value.length);
value = beginning + value.charAt(i + 1).toUpperCase() + ending;

// Subtract from 'i' because the string is shorter, now.
i--;
}
}

return value;
}

} // End class
}

Tuesday, May 13, 2008

Re-sizeable (Resizeable) Text Area for Flex 3 without scrollbar

Flex's TextArea class always uses a scrollbar to compensate for text too large to fit, but I wanted to find a way to resize without it. All of the examples that I found online that worked only took into account the height, so here's what I came up with to make the TextArea resize to a nice width to height ratio of 1.5 to 1:

*******************************************************************************
*******************************************************************************
IMPORTANT NOTE!! -- Blogger.com wouldn't let me post the content below without corrupting my CDATA tag. YOU'LL NEED TO ADD THE "!" back in at the appropriate place in the beginning CDATA tag (after the "<") for this example to work!
*******************************************************************************
*******************************************************************************





<[CDATA[
import mx.events.FlexEvent;

[Bindable]
private var myText:String;
[Bindable]
private var starSpangled:String = 'Oh, say, can you see, by the dawn\'s early light what so proudly we ' +
'hailed at the twilight\'s last gleaming?' +
'Whose broad stripes and bright stars, through the perilous fight, o\'er the ramparts we watched,' +
'were so galantly streaming?' +
'And the rockets\' red glare, the bombs bursting in air, gave proof through the night that our' +
'flag was still there. Oh, say, does that star-spangled banner yet wave o\'er the land of the free' +
'and the home of the brave?';

private function onCC():void
{
textArea.addEventListener(FlexEvent.UPDATE_COMPLETE, resizeTA);
myText = starSpangled;
}

private function resizeTA(e:FlexEvent):void
{
// Calculate the minimum area required.
var width:Number = textArea.width;
var height:Number = textArea.textHeight + 22;
var minRequiredArea:Number = width * height;

// Calculate how to get that with the desired ratio of width:height = 1.5:1
var ratio:Number = width/height;
while (!(ratio >= 1.5)) {
width += 1;
height -= 1;
ratio = width/height;
}
// Set the width and height to the new values.
textArea.explicitWidth = width;
textArea.explicitHeight = height;
textArea.removeEventListener(FlexEvent.UPDATE_COMPLETE, resizeTA);
}

]]>