• missing xbfish.com image

Monthly Archives: December 2008

My Mobo is dented!

Very sad. I seriously hate Intel HSF push pin style. My motherboard is bend now.

Like the picture below, dented mobo:

Also, my temperature rises up to 44C during idle time. At average load, the temperature is near 60C. This is consider relatively high for my E4700 since I have not overclock the CPU yet.

I am definitely going to change my PC casing since it pretty sucks big time. The PSU is SUPER NEAR my mobo. I have heat dissipation problem too because of the lousy casing structure. Don’t ask me why I get this casing last time.

I am also going to get a LGA775 back-plate for my mobo, eliminating push-pin style! Moreover, I am considering to buy CoolerMaster Hyper 212 Heat Sink Fan to replace my stock HSF. I hope all these will change my temperature.

If everything is success, I will also try overclocking my E4700 to 3.0Ghz. This will certainly improve my computer “horsepower”!

Loading is slow

I know. I will look for another web hosting when I am free.

Merry X'mas



I wish everyone a Merry Christmas and soon a happy new year!

Medical Check-up Aftermath

Day 3 after a medical check-up @ CMPB:


Free Image Hosting at www.ImageShack.us

My arm that got inject out for blood sample. Super high ~

Apply thermal paste on C2D stock heatsink

Below video is not a C2D stock heatsink, but somewhat it resemble the shape. It is hard to apply the thermal paste because of the circular shape of the heat sink.

See the jitpun kia do:

Lastly, thanks xiao ming a zillion for lending me his thermal paste. Now my computer is okay :D

Unlink in CodeIgniter

If you have problem using PHP unlink() function in CodeIgniter, I have a solution to it.

Below is the error you would most likely encounter:

A PHP Error was encountered
 
Severity: Warning
 
Message: unlink() [function.unlink]: http does not allow unlinking

Apparently, it seem that we can’t delete the file directly with absolute path in CodeIgniter. (Example of absolute path is http//:….)

So in order to resolve this, we have to do the following:

1
2
3
4
5
6
7
8
9
10
11
//define the root directory of CodeIgniter
$path = "images/" .$the_file_you_want_to_delete;
 
//from here, delete the file off using unlink
$result = unlink($path);
 
if($result){
   $data['status'] = "File has been deleted successfully!";
}else{
   $data['status'] = "There is a problem deleting the file!";
}

As you can see, unlinking the file using relative path works pretty fine and well.

Module and Class in Ruby

Headache, module and class is so similar. So, what’s the difference?

Consider the following piece of code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Willie
    NAME = "willie"
 
    def hello
        "Hello"
    end
 
    #module_function :hello
end
 
#puts Willie.hello
 
class Mingen
    include Willie
 
    def shout
        hello + " I am Ming En"
    end
end
 
xiaoming = Mingen.new()
puts xiaoming.shout

In the above example, a class can include a module and call the module method directly. Results is as below:

1
Hello I am Ming En

However, we cannot call the module method directly, it will result in an error! So, we have to make use of module_function so that the method(s) in a module can be called.

Example:

1
2
3
4
5
6
7
8
9
10
11
module Willie
    NAME = "willie"
 
    def hello
        "Hello"
    end
 
    module_function :hello
end
 
puts Willie.hello

Result:

1
Hello

Notice that calling a Module method is different from calling a Class static Method. A module object do not need to be created. Take note of the below, Module is represent as Mod and Class is represent as Class!

1
2
Mod.method #Calling Module method without instantiating
Class::method #Calling Class method without instantiating

Instance & Class Method in Ruby

Consider the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class Animal
 
    def self.haha #Class method
        puts "hello"
    end
 
    def haha #instance method
        puts "bark"
    end
 
end
 
dog = Animal.new()
dog.haha
 
Animal::haha #Calling class method

Result:

1
2
bark
hello

Changing Image Link Color in IE

Internet Explorer…. The most fuck up web browser in the world. Seriously, their rendering of HTML and Javascript sucks well enough. Now add in CSS, EPIC FAILURE!

In IE environment, you tried changing the the image link with:

1
2
3
A:link{
color:#FFFFFF;
}

However, Internet Explorer give you a default blue border color on the image link! This is seriously fuck up for web developers doing cross-platform scripting.

Nevertheless, there is a solution to it. See below:

1
2
3
a img{
border-color:#FFFFFF;
}

Internet Explorer will then render the image link and set the border color to white. Of course, Firefox, Opera and Chrome will still be able to work normally.

So that’s about it.

Original source: http://www.webdeveloper.com/forum/showthread.php?t=149227

Router Case Modding?

You probably have heard of PC case modding. Now, what about Router case modding?

And yes, I did that when I was very bored.

Before:

After:
Free Image Hosting at www.ImageShack.us

Free Image Hosting at www.ImageShack.us

Free Image Hosting at www.ImageShack.us

Free Image Hosting at www.ImageShack.us

So, give me a round of applause. =)