Friday, February 25, 2011

Hidden new line in string PHP


I guess you seen the problem, or maybe facing with it at the moment. So if you echo the string with pre tags, it will show normally. But without pre tags, it shows ugly... just like a plain text.

The problem is that there is hidden new lines symbols like /r or /n and so on...

Just by replacing the with str_replace is not enough. So here solution for it:

$value = preg_replace('/[\r\n]+/', '\n', $value);
echo htmlentities($value);

Tuesday, February 22, 2011

Real Megatron Tank from Transformers 2

Can you believe it? Real replica of Megatron Tank from Transformers 2 was made by one chinese metal artist. Full weight of the tank is more than 5000 kg.

Here is image of megatron tank made by fan


And here photos from real life
















Monday, February 21, 2011

Do you need to close apps in your multitasking bar?

No you don't says website - http://www.tipb.com/.

I was wondering about this too and i always close applications in my multitasking desk of my ipod touch 2generation.


Thursday, February 17, 2011

How to test your hardware for problems

To find problem in your hardware you need to test everything... But you need to think... I mean, if windows loads up it means that video card, hard disk, rams, and so on works... Possible case - they works not good as "good", but they still works.

Anyways..

Here is some list of programs and other tricks i found while searching internet how to test your hardware parts.

Ram ( Random Access Memory ):
To test your RAM, you can do just by checking your Task Manager ( Performance tab ). Also you can see how many rums installed by going to "my computer"'s properties.
In harder cases people recommend to download these programs:
Most of the information was fount on ehow.com

Hard Disk ( Hard Drive ):
Most of test which you can do for your hard drive is installed in windows. It called "checkdisk" or chkdsk.exe, you can run it from command line. In other case you can do that from your file explorer:
  1. Go to computer, 
  2. Select hard drive
  3. Open properties
  4. Choose tools tab
  5. Press "Check Now" button, in "Error-checking" section
  6. In showed up windows check all possible check boxes and press Start.
  7. Wait until finishes and press Done. 
Also you can test your hard drive with SeaGate tool ( http://www.seagate.com/www/en-us/support/downloads/seatools ). 16,7 MB

Funny part of this, is that you can listen for sounds which hard drives are making ( in case if it is still working ), and check if it matches one of these ones: http://datacent.com/ . If it does,... i guess you need to change it.

More useful freewares such as "Hitachi Drive Fitness Test" or "Samsung HUTIL" and so on... can be fount here: http://pcsupport.about.com/

GPU ( Graphic Process Unit ):
First of all windows has included tool for this - dxdiag . You can run it from Command line.
  1. Press Start 
  2. Run 
  3. Cmd.exe 
  4. dxdiag 
  5. hit Enter
  6. check Dispay tab, for video card information.
Most popular method to test your video card is to install and run one of Benchmarks product 3DMark. http://www.futuremark.com/

Motherboard:
If motherboard is not working properly you will notice it. Some of these facts says about it:
  • Computer does not boot, and instead gives beep sounds.
  • Computer random crashes.
  • Computer randomly reboots.
and so on..


One of great software to test motherboard is Hot CPU Tester.

Sunday, February 6, 2011

Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error. [Solved]


I got the error after, updating my chrome to 9 version. I appeared few times, and i decided to fix it. So here is solution for the error:

Chrome:
1. Open Options
2. Choose Under the Hood tab in options
3. Press Reset to Defaults
4. Done.

Common tags for the article: chrome, problem, mistake, bug, error, how to