10 sept 2010

StringBuffer

Clase JAVA que representa una secuencia de caracteres modificables en cualquier momento por cualquier proceso (safe-thread).

Los métodos de StringBuffer son synchronized donde sea necesario pudiendo usarse de forma segura en un escenario multiproceso.
De forma que las operaciones realizadas sobre una instancia se comportan como si hubieran ocurrido en serie, pero manteniendo la consistencia de las llamadas de cada uno de los métodos.

Caracteristicas principales

Los métodos Append e insert, vienen sobrecargados para aceptar cualquier tipo de dato, que muy eficientemente lo transformará en una secuencia de caracteres.

Además la clase autogestiona su capacidad. Si se queda sin espacio reserva nuevo.

Una opción para un solo proceso (single-thread) de esta clase es StringBuilder

9 sept 2010

Reset mysql root password on Windows ( Metodo infalible)

Tras muchos quebraderos de cabeza tras olvidar la clave root del mysql en mi máquina local, por fin he descubierto como hacerlo sin problemas...

Muchos sitios web, hablan de instrucciones por linea de comandos, etc...
Todos estos métodos que he probado, siempre fallan, por alguna propiedad de nuestro servidor mysql... que causa un error e impide ejecutar las tareas que nos dictan..

Existe un método infalible.
Muchos habréis probado a desinstalar el mysql server, viendo con horror en la nueva instalación, como os pide el password antiguo una y otra vez...

Pues bien en Windows 7 existe una carpeta llamada ProgramData, que en otros windows estará en users/user/appdata o alguna ruta parecida...
borra la carpeta de mysql y reinstala tu mysql.. Problema resuelto.

Diréis vaya cosa...
Pues me da igual... este apunte es para mi!
ya que cada vez que olvido el password del root de mysql, pierdo 5 horas en volver a ponerme a funcionar.

ea!

27 ago 2010

Could not reliably determine the server's fully qualified domain name Error

Utilizando Apache Web Server sobre Windows7, y creo que Vista también, por los posts que he leído en la red, nos podemos encontrar con el siguiente error:

Could not reliably determine the server's fully qualified domain name, using 192.168.1.128 for ServerName

... o cualquier otra IP según vuestro rooter.

Tras leer varios posts acerca de como solucionar el problema en vano, os voy a contar un pequeño truco para corregirlo, sin entrar mucho en la raiz del problema, ya que mis conocimientos administrativos sobre Windows7 aún son muy escasos.

Problema

Ocurría cuando accedía a algún virtual host definido en el Server.
Tras comprobar que la configuración del Apache esta bien, y también la configuración del archivo hosts... conluimos que tiene que ser un problema de permisos sobre alguno de estos archivos.

Supongo que todo tiene que ver al editar estos archivos, los permisos quedan modificados de tal forma que chocan con las reglas de seguridad de estos sistemas operativos que son más restrictivos.

Solución

Copiar algún archivo de esas mismas carpetas y del mismo tipo que los archivos de configuración que no hayamos modificado.
Copiar el contenido de nuestros archivos de configuración y pegarlo en estas copias, con algún editor de texto básico que no haga más operaciones en el background de su acción guardar.

Sustituir las copias por los archivos... y todo debería estar funcionando.

22 ago 2010

5 Common SEO Mistakes with Web Page Titles

Page titles are one of the most powerful on-site search engine ranking factors that you have control over but website owners often neglect them.

Whether your intention is to improve your search engine visibility or make your website more meaningful and interoperable, you should avoid these five common pitfalls when coming up with page titles.

What Are Web Page Titles?

A web page title is the value you assign the "title" tag that’s typically found on top of an HTML/XHTML document inside the "head" tag.
Most web browsers will display the web page title at the top of the browser window and/or in the browser tab.
For example, the following title:
10 SEO Tips to Remember When Building Your Site
Shows up like this in Google Chrome, Mozilla Firefox, and Microsoft Internet Explorer:

And then, this is how Google displays the title value (after a search query of "seo tips remember"):
value" width="550" height="164">
Now that we are all synced up on what exactly web page titles are, let’s discuss popular mistakes that I see with web page titles.

1. Not Having a Title

There is a tremendous number of websites that don’t have a title tag or that use a default title like "Untitled Document". Just try a search in Google for "untitled document" and you won’t believe the millions of results that matches your search.
Not Having a Title
Because search engines use your title tag to display in their search results, not having one — or having one that isn’t meaningful — makes it hard to find and index your pages.
Page titles give a web page some context. It tells a web robot like Google’s search spider what the web page is about.

2. Page Titles That Are Too Short or Too Long

Even though this is not a massive issue, short page titles will limit the potential of a page to rank for several keywords. Google, for example, can display up to 70 characters in their search engine results page (SERP) — why not take advantage of that?
But don’t overdo it. Keep in mind that the more keywords there are in the title, the more diluted they become. Having too many keywords in the page title, although visible by Google, can lead to the common issue of keyword cannibalization (which we will talk about next).
Terms that appear first in the title are the ones that will be given more importance. For example, if a web page talks about how to repair a broken hard drive on a Dell XPS laptop and the main keywords are "repair", "Dell", and "XPS", a title like:
DIY: How to Repair a Broken Hard Drive on a Dell XPS Laptop
Can be revised to:
Repair a Dell XPS Laptop's Broken Hard Drive
Notice how the key terms are closer to the beginning in the second example, and that it is shorter than the first example. Not only is it better for search engine ranking, but it’s also easier to read and comprehend.
Devise great titles that give your web pages meanings, and remember that web users want information quickly — don’t make them have to think about what your page titles are by writing informative page titles that are neither too short and lacking information or too long and hard to read.

3. Keyword Cannibalization

This is a situation when pages titles are stuffed with too many keywords. Keyword-stuffing is an unscrupulous tactic that a few SEO consultants use to improve their clients’ search engine rankings. Though I am an SEO consultant myself, I don’t recommend blatantly loading your pages with keywords because not only does it affect your search engine ranking’s effectiveness, but is also the reason that we sometimes see non-relevant web pages ranking highly for a specific keyword.
Because your web pages are (or should be) distinct and should have unique content, the same should be the case with page titles. Repeating the same keywords in various pages regardless of whether or not they are relevant to that particular page is not going to help, mainly for two reasons:
  1. Irrelevant web pages may be picked up by the search engines, but will have high bounce rates as it doesn’t convert effectively due to the fact that the page isn’t what the searcher is looking for
  2. It violates Google’s mantra of "Don’t be evil"

4. Using the Company/Site Name in All Web Pages

As previously said, Google displays up to 70 characters of a given page title in their SERPs. It does see longer ones, though, and despite what many SEO professionals preach, it isn’t a huge problem to have page titles that are greater than 70 characters in a page title.
Nevertheless, you need to think of what should and shouldn’t appear in the title. Many website owners tend to include their business name in the title, some of which can be very lengthy. What is even worse is that they want their name to appear first in every single web page.
Including your company name (unless it’s a search term that will likely be used), is unnecessary, and is consistent with some of the mistakes I’ve discussed earlier.
For example, study this title:
ACME Exporting/Importing Company, LLC: Export Surfboards to Hawaii
With the page title including the company’s name, it is using 37 more characters (with spaces)!
Search engine ranking might be better if it was simply:
Export Surfboards to Hawaii
It would make sense displaying your company name in the homepage, contact page, and about page but avoid them in content pages.

5. Duplicate Web Page Titles

Another common mistake is having duplicate page titles. This makes it difficult to determine which page is which when they are all displayed in search engine results pages.
As previously said, all of your web pages should be unique — so by logic, all of your web page titles should also be unparalleled.

Related Content