Wednesday, June 24, 2009

Bride And Groom Thank You In Program

Managing PHP and accented

Before starting with the areas of programming, a rule of grammar: the case always, always, always accentuated.

That said, I came across in php if I had a list of options based on a select that I showed the accents correctly. MySQL and php by default use utf-8, so it is good practice to put our html utf-8:

  1:  \u0026lt;meta http-equiv=  "Content-Type"  content=  "text/html; charset=utf-8" > 




However, JavaScript is not used by default utf-8, so when you place a text through document.write, the screen will display the text emphasized as a special character in html (html entity):





  1:    changecities function ( formObj) 


  2: { 


  3:  statesObj = eval ( "formObj.states"    ); 


      4:     


      5:      state = statesObj[statesObj.selectedIndex].value; 


      6:      citiesObj = eval(   "formObj.elements['cities']"   ); 


      7:     


      8:        // remove all entries   


      9:      citiesNum = citiesObj.length; 


     10:        for   (i=(citiesNum-1); i >= 0; i--) 


      11:      { 


     12:        citiesObj.options[i] =   null  ; 


     13:      } 


     14:        // add entries based on area selected   


     15:        switch   (state){ 


     16:     case     "3"  : 


     17:      citiesObj.options[0] =   new   Option(  "Comondú"  ,17); 


     18:      citiesObj.options[1]   = new Option ( "La Paz" , 18); 


  19:  citiesObj.options [2] = new   Option ( "Loreto" , 19); 


  20:  citiesObj.options [3] = new   Option ( "Los Cabos" , 20); 


  21:  citiesObj.options [4] =   new Option ( "Mulege"  , 21); 


  22:  citiesObj.options [0].  selected = true ; 


  23:    break; 


  24:  


  25:}  


  26: } ... 




image



Php is an instruction to turn this character, its value to the character you want:





  1:   \u0026lt;? Php      html_entity_decode ("& #  250" );? >  




should result in "ú"



image



But as we see in the image, select does not display correctly because the instruction html_entity_decode actually results in a character set "ISO-8859- 1 ", so we can choose to do one of two things:




    Use
  1. utf8_encode :



      1:   \u0026lt;? Php     utf8_encode  (  html_entity_decode ("& #  250" ));?  >  





  2. Change character set option in the instruction html_entity_decode (string, quotestyle, character-set):




  3.   1:   \u0026lt; ;? Php      html_entity_decode ( "&250;" ,   ENT_COMPAT mode,  "UTF-8" )? >  







Deployment is:



image



Ready!

Friday, June 12, 2009

Broken Capillaries On Men

Javascript Resize VirtualBox vdi file

I like to put tutorials are located in another web site, but in this case, the tutorial also solved the problem he had with the initial size of the disk of windows xp in virtualbox is so clear follow that lead had no problems with resizing virtual hard disk partition.

http://www.my-guides.net/en/content/view/122/26/

If anyone is interested in a translation anyway, just warning.

Ready!

Monday, June 1, 2009

Play Pokemonplatinum Online

Where is the folder of patterns in Fireworks CS3?

Sometimes I start to make models of any site in Fireworks, even when I try to use Photoshop, the fact is that FW is fairly light and I'm not cans especially for the layout. I'm working on it for a site and I thought about finishing the site design.

But when starting with the creation of CSS files for the graphics I ran I did not know which was the size of the patterns that had been placed as fill in some of the funds, this is important for optimizing the size of the images.

So as I spent a while in the search, I put the exact folder used in Windows Vista:

C: \\ Program Files \\ Adobe \\ Adobe Fireworks CS3 \\ Configuration \\ Textures

Ready!