Microsoft or Windows Update stopped working with error 0x8024402F

It happened to me twice on a new installation of Windows XP. In the first time I reinstalled Windows to fix it. On the second time I researched a bit and found the problem to be the installation of .NET 4.

The only way I found to fix it was to uninstall .NET 4 completely. Repair of .NET 4 or of Windows update did not help.
As far as I know, if you use Windows XP you have to live without .NET 4 or without Windows Update. If you use newer versions of Windows you can try installing .NET 4.5 since it’s a replacement of .NET 4. Unfortunately Windows XP is not supported by .NET 4.5.

I would love to know if you have a solution for Windows XP users.

([url=https://social.technet.microsoft.com/Forums/en-US/itproxpsp/thread/fdd723f8-af81-4331-8c56-0b09432d92bc]a conversation about the topic[/url])

Update: I have asked the quesion on superuser.com and some time after trying to solve the problem it started working. I don’t know what helped or if it is something from this page but [url=http://superuser.com/questions/636554/how-to-install-net-4-on-windows-xp-without-getting-error-0x8024402f-from-window]you can try[/url].

Why Windows XP becomes very slow permanently after disk I/O errors and how to fix it

I have two hard drives, one is SATA and the other one is an old IDE (PATA). I use mostly the IDE because it is larger.
The SATA was causing errors which crashed my Windows and Linux OS’s so I disconnected it altogether. The crashes vanished, but XP became inconceivably slow. Boot was taking about 30 seconds, it became a few minutes. Opening applications was also very slow.

I didn’t have a clue what could cause that so I searched, and after some time I have found this: [url=http://support.microsoft.com/default.aspx?scid=kb;en-us;817472]Link to Microsoft support[/url]

Basically what it says is that for some reason, after too many I/O errors, Windows XP changes the way it interacts with the hard drive to be very slow and reliable. When the I/O errors stop happening it should have been reverted to the fast method again but that does not happen.

To fix that, first eliminate the source of I/O errors (in my case, the SATA drive), and then uninstall the IDE controller driver through Device Manager. Reboot, and Windows will install the correct driver, reboot again and voila, your XP is fast again.

How to install SublimeClang on Archlinux

SublimeClang is a cool and useful extension for SublimeText which enables IDE features for C++ programmers.
Here are the installation instructions for Linux from [url=https://github.com/quarnster/SublimeClang#additional-prerequisites-linux-only]their github page[/url].

There are two problems with the installation on Archlinux.

Problem A

SublimeText looks for Python 2.6. Archlinux has Python 3 and Python 2.7,

Solution

Step 1

Install [url=https://aur.archlinux.org/packages/python26]python26[/url] from AUR.

Step 2

Create a symlink to the new Python 2.6 installation in the right place for SublimeText to find, [b]as root[/b] (sorry, I don’t know how to solve it without creating a symlink as root).

ln -s /lib/python2.6/ /opt/sublime-text/lib/python2.6

Problem B

When trying to build libcache the build environment won’t find libclang.so and will try to build it and fail.

Solution

Copy the file to a place where it will be found.

cp /usr/lib/llvm/libclang.so ~/.config/sublime-text-2/Packages/SublimeClang

Now clean the build environment if needed and run the cmake and make commands as written in the instructions.

It should work now. Tested on Archlinux 64 bit.

How to tell ruby (rails) which version of rake to use?

I am playing a bit with Rails on Archlinux. and the first command I ran errored on me:

% rails new Site
...
...
...
run bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..

Errno::EACCES: Permission denied - /usr/lib/ruby/gems/1.9.1/cache
An error occurred while installing rake (10.0.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.2'` succeeds before bundling.

I do have ‘rake 10.0.2’ installed but I also have ‘rake 0.9.2.2’ because Archlinux bundles it with the Ruby package. I struggled to find a way to tell Rails to use the newer package.

The solution turned to be quite easy. Just set the GEM_HOME environment variable to where your gems are installed. For example:

export GEM_HOME=/home/username/.gem/

If you want it to be persistent add it to a file which is sourced every time you log in, like for zsh you can add to the file /home/username/.zshenv :

GEM_HOME=/home/username/.gem/

Now it will work:

% rails new Site
...
...
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

How to install Microsoft Security Essentials on Windows Server 2012 or The best antivirus for Windows Sever 2012

In my experience, MSE (Microsoft Security Essentials) is the best antivirus considering price, efficiency and lightness. Unfortunately it is impossible to install it on Windows Server 2012. Microsoft does not allow it for some reason.

Fortunately, Microsoft has another product which is so similar to MSE that you won’t notice the difference. It is part of the System Center 2012 suit from Microsoft. The whole suit is free but weighs 1.5GB so it is quite inconvenient to download it and find the Antivirus inside. So lucky you are, someone extracted the antivirus for you.
[url=https://anonfiles.com/file/5ec1dd0188b70b2bdd9dc517f113f9b9]Download[/url]
Tested, confirmed to work, and it is clean for sure because it is extracted right from a Microsoft archive.

Note: you may want to look at pytex’s comment for an updated version. I did not test it.

How to run Starcraft Brood War and Diablo II on Windows 7? (Color correction)

Old games and new versions of windows not alwasy go well together, but sometimes there are games which stay with us for a very long time and require some fiddling in order to work.

Most of the problems with old games can be solved by simply running them in compatibility mode or as administrator. Starcraft does not need it, and Diablo does. These two games have another problem. Although they run, their colors are messed up. Luckily, once you know the solution it is very simple. Close explorer.exe and viola! the colors are good again.

Closing explorer.exe has a price though. You can’t change volume, and it is harder to start up your games. In order to help with these two tasks, I wrote a little C# application which allows you to close explorer, run your games and open the sound mixer in order to control the sound. Extremely simple but useful.

It can be downloaded from here: [url=http://www.kfr.co.il/files/Windows_7_Gaming_Compatibility/Windows_7_Gaming_Compatibility_32bit.7z]32-bit[/url], [url=http://www.kfr.co.il/files/Windows_7_Gaming_Compatibility/Windows_7_Gaming_Compatibility_x64.7z]64-bit[/url], and the [url=http://www.kfr.co.il/files/Windows_7_Gaming_Compatibility/Windows_7_Gaming_Compatibility.src.7z]source code[/url].
Make sure to use the right architecture because manipulating explorer with the wrong version won’t work.

[center][img]http://www.kfr.co.il/wp-content/uploads/2011/02/Windows-7-Gaming-Compatibility.jpg[/img][/center]

How to remove selected items from a Gtk::TreeView using gtkmm? The painless way.

I am building an application using C++/gtkmm-3.0. The development process is sometimes nice and sometimes too complicated in my opinion. The worst part until now was when I wanted to remove the selected items from a tree view.

This is a tree view:
[center][img]wp-content/uploads/2013/05/treeview.png[/img][/center]
Behind a tree view there is a “store” which holds the information for the view, like a model in MVC. Sometimes you need to enable the user to choose multiple items from the view and delete them. Should be simple, right?

I was expecting something like

treeview.removeSelected();

or

store.remove(treeview.getSelected());

but no, it won’t be that simple.
According to the official documentation you have to reviece a “selection” object from the treeview and keep it. Then you have to create a (wasn’t so easy for me to find it’s structure) callback function that deletes an item, and when the user presses delete you tell the “selection” something like

selection.selected_foreach_iter(pointer to the callback function);

And that’s supposed to do it. I was surprised to see the steps needed, and even after it did somewhat work, Gtk wrote on the command line that this way of iterating over a selection is for reading only and for manipulating the store I have to use another way. Well, I wasn’t the one who came up with that method, I saw it in a few examples and tutorials and it was used to delete items.

I became tired of the over complication and found a simple little way to do it. I don’t know if it “right”, but it is simple and it works.

We have our class, with the view, store, and selection as private members.

Gtk::TreeView treeview;
Glib::RefPtr<Gtk::ListStore> store;
Glib::RefPtr<Gtk::TreeSelection> selection;

In the constructor we initialize the selection

selection = treeview.get_selection();
selection->set_mode(Gtk::SELECTION_MULTIPLE); // enable multiple selection

And then, all we have to do in order to remove the selecte items is:

void MainWindow::_remove_selected()
{
    vector<Gtk::TreeModel::Path> paths = selection->get_selected_rows();
    for(int i = paths.size()-1; i>=0; i--)
        store->erase(store->get_iter(paths[i]));
}

That’s all. 3 lines of code. Why not do it like that? Why the over complication? Who knows.