My posts on this site are now signed. You can find a gpg-block in the source code of the page. Pass it to gpg, and you get the markdown used for generating the site and check the signiture, if you have my GPG key installed.
This tutorial describes how to open your Asus N750JV and replace the hard disks. If you need to replace another part, at least the opening part should apply.
As the Asus N550JV is quite similar, judging from the specs, to the N750JV it might work for it too, but I haven’t checked it. Please leave a comment, if you have one.
On the backside remove all 14(!) Torx screws. You then can remove the cover carefully.
The notebook contains two drive bays, one on the left and one on the right. Depending on the type of your laptop one or both have already a drive inside. You should already have made a backup of the drive you want to change; if not, you should do it now. :p
If you only have one drive, the bay on the left is empty. We will use that as an example below, the other one can be removed the same way.
Remove the four silver Philips screws holding the bay in place and pull it out using the black strap.
If the bay already contains a drive, carefully remove the connector by pulling on it.
If the bay is empty, there is a rubber placeholder on one side. Remove it.
Place the new 2.5’‘ drive in the bay, so that screw holes on the sides line up with the holes in the drive. the connector should face to the side, where two holes are present in the screw latch.
In the packaging of the laptop four screws are taped inside. Take them out and screw them into the side of the bay, fixating the hard disk.
Connect the hard disk connector to the hard disk and but the bay back in. Align the screw holes at the bottom of laptop and put the Phillips screws back in.
Make sure you haven’t left anything in the laptop that doesn’t belong there and all cables line up correctly. Esp. the speaker cable can easily be pinched in.
Put the bottom lid of the laptop back and make sure everythink fits. Than put the torx screws back in. (You might want to wait until you’ve checked that the laptop recognizes the drive, so you don’t have to unscrew them again; or screw in only a few first. Just be careful while rotating the laptop without screws holding the lid)
If everything was done correctly, your laptop should boot, recognizing the new drive.
The octopress developers removed the twitter sidebar in march, as I just discovered, as I was upgrading my opctopress installation.
To restore it you basically have to create a custom aside file and include a widget created on the Twitter website.
This blogpost describes how to do it.
Although I despise external webservices (e.g. because of privacy and reliability problems) I’ll activate octopress’s disqus feature for now.
We stumbled upon an unexpected way default parameters work while writing python code for our current game project.
In Python you can specify a default value for a function parameter, which is used when the function is called with less parameters than the function needs.
1 2 3 4 5
In python strings are immutable, that means you can’t change it after creation. When you for example concatenate two strings a new one is created, so there is no way to change the default parameter string.
But what happens if you use an empty list as the default parameter? I expected to always get an empty list.
So the following function should always print the same.
1 2 3 4 5 6 7
What happens here?
A list is mutable, that means you can add or change elements in the list. And you get passed the same list instance each time on a call to append_one, as variables are passed by reference in python. So this behaviour is actually not that surprising. The same is the case for each other mutable class you pass as a default argument.
But how can you use a mutable object?
There are several ways, but I like the following.
Instead of passing the object directly, we pass None and check for it in the function.
1 2 3 4 5 6 7 8 9 10 11
We also used the compact or notation, see the Python documentation for how that works.
Edit: There is also a good post on stackoverflow answering why it was done this way.
Hey, yet another blog is born to the interwebz!!111