String concatenation optimization

2 Comments »

A discussion on the performance of various ways of concatenating string in c#.

Conclusion seems to be StringBuilder provides better performance for larger concatenation iterations. String.Format does not.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Comparison of foreach and List.ForEach

No Comments »
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Sorting links

No Comments »

http://www.sorting-algorithms.com/ holds a nice overview of the most common sorting algorithms.

http://www.csharp411.com/c-stable-sort/show a demonstration of an insertion sort algorithm done in C#.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Installing VirtualBox guest additions on Fedora 11 in Windows (and change the screen resolution)

No Comments »

Once Fedora has been installed:

  1. Unmount the CD-ROM from the VirtualBox toolbar “Devices > Unmount CD/DVD-ROM”. This might require a restart of Fedora.
  2. Click “Devices > Install Guest Additions”, this will mount the guest additions CD.
  3. Open a terminal window (ALT+F2: gnome-terminal).
  4. Type su to switch to administrator mode. (Type the password when prompted).
  5. Install GNU Compiler Collection. Type: yum install gcc
  6. Install the kernel develop: yum install kernel-devel
  7. Now type  cd /media followed by cd VB ([tab] to complete, name depends on version)
  8. Type ./VBoxLinuxAdditions-x86.run (replace x-86 with amd64 if you are running 64 bit OS, and yes it is case sensitive.)
  9. Step 8 might fail because of version issues. You will be instructed to “install the build and header files for your current Linux kernel.” and you will be given the current kernel version. In my case this was 2.6.29.4-167.fc11.i586 so I did yum install kernel-devel-2.6.29.4-167.fc11.i586
  10. Log out and log back in and you’re done.

After installing you should get a higher screen resolution. However, it still might not be large enough to fit your screen fullscreen.

To resolve this follow these steps.

  1. Install the package system-config-display. Type yum install system-config-display
  2. While this installs the package, you will have to run system-config-display –noui –reconfigure before you can use it.
  3. This will create the /etc/X11/xorg.conf which you will have to edit. Type gedit /etc/X11/xorg.conf
  4. Locate the section “Device” and add before “EndSection”: Modes “1024×768″ “1280×1024_75.00″ (Change the resolution to fit your screen settings. _75.00 means refresh rate of 75 Hz.)
  5. Save the file. Log out and log back in.
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.50 out of 5)
Loading ... Loading ...