Feeds:
Articole
Comentarii

Yey

Tanenbaum – Computer Networks – page 451
smily
“Figure 7-6. Some smileys. They will not be on the final exam :-)

Phew, that’s a relief.

C error

“If you lie to the compiler, it will get its revenge” – Henry Spencer.
Finally got mine to spit out the dreaded ‘confused by earlier errors, bailing out’ error:

cerror

BF

Of course, I only post in the exam session; this is a must-have for my repository, a printscreen with my first experience using BrainF**

Cool swap!

So , we have the simple integer swap:


void swap(int *x, int *y)
{
int *z = *x;
*x = *y;
*y = *z;
}

I know I’m naive and get excited by simple stuff, but I’m still amazed that it took me so long to find this alternative:
void swap(int *x, int *y)
{
*x ^= *y;
*y ^= *x;
*x ^= *y;
}

I was beginning to wonder when XOR will help me in life…

P.S: works well especially for obsessive-compulsive maniacs which think their life won’t be peaceful if they don’t choose the best time/space complexity ratio for all their code.

…is the name of a song from Aphex Twin’s album Windowlicker from 99′.
Import the music file in some audio editor that supports spectral view (I used Cool Edit Pro) like this:
1

Select the last part of the song (like in the above image) and open it in a new window (for CEP the action is right-click and Copy to New) . In the new window, choose to display the audio file in spectral form:

2

… and the final result will be …

3

…voila!

Creepy, huh?

iPhone vs Rock

w-455

Male vs female

brain_male1

VS

brain_female

np_complete

Source:xkcd

There are some hidden files in which Windows keeps information about what we’ve done on our PC’s. For example: Windows does not really clean your IE history even after you instructed it to do so, and it does not erase your mail even if you deleted it from Outlook.

How it’s done

The information is usually stored in “index.dat” files, which are contained in folders named “name.ie5″ (ex: Content.ie5, history.ie5, etc). They appear hidden because of some instructions kept in the “desktop.ini” files contained in the name.ie5 folder and the parent folder. This way, they cannot appear in Windows Explorer (even with the “show hidden files” attribute enabled), in searches, nor in MS-DOS after a proper directory listing. An example:

  1. Open a Command Prompt window (start->run->cmd)
  2. Change directory to WP:\Documents and Settings\User\locals~1\tempor~1 (where WP=your Windows Partition and User=your username)
  3. List the contents of the directory by typing “dir”. As you can see, no directory in the “name.ie5″ form appears in the listing.
  4. Type “desktop.ini” to open this file. As you can see it contains some text:
    [.ShellClassInfo]
    UICLSID={7BD29E00-76C1-11CF-9DD0-00A0C9034933}
  5. Now change directory to “Content.ie5″ (you can see it accesses it even if it doesn’t appear in the directory listing).
  6. Again, open the “desktop.ini” files which belongs to this directory. As you can see, it again contains the information:
    [.ShellClassInfo]
    UICLSID={7BD29E00-76C1-11CF-9DD0-00A0C9034933}

Desktop.ini files contain information that customizes certain aspects of the directory it belongs to; in this case, the UICLSID attribute with the given value cloaks the folder in Windows Explorer. In other files, desktop.ini may contain another attribute, CLSID, which makes the “Search” utility not to look in these folders. To see for yourself, simply delete the “desktop.ini” files and you will see that after that the directory will normally appear in Windows Explorer and in searches.
But, deleting them isn’t enough because Windows reconstructs them at every boot. So,delete everything in the file except the [.ShellClassInfo] line; this will fool Windows into thinking they’ve still covered their tracks.

easter bunny


The easter bunny is a little late this year, but i think we can all see why.

Articole mai vechi »