Category Archive: Howto

Jul 27

Send var_dump result to a string variable with PHP

Maybe you need to capture var_dump result in a variable to use it like a string in you context. You don’t want to output result but just have it in your hand.

Continue reading »

Jul 21

how to check free space on disk in CentOS

To check free space on the disk using Linux environment like CentOS you can use the df command like “df -h“. The manual page says:

Continue reading »

Jul 06

Diff two files in Eclipse

Developing with Eclispe could be tricky, just an example : what do you do when you want to compare two files? Solution is really near you, just: Select you file with CRTL+Click or CMD+Click Right Click on one file and select “Compare With” -> “Each Other”

Jul 06

Adding new jar library in GAE

When you begin using Google App Engine the first matter you encounter is to add support for your preferites jar libraries. That seems difficult will be a simple matter: Copy your jar library in NameOfYourApp/war/WEB-INF/lib directory Then Add it to Java Build Path : you can go to the project properties and then “Java Build …

Continue reading »

May 03

Check is form with enctype multipart/form-data is submitted in Java ServLet

When we work whit Java Servlet and make use of forms with enctype setted to multipart/form-data we need to know if the form is submitted. In classic implementation ( without multipart/form-data) we use request.getParameter(“submitButtonName”) function to check if submit button is clicked but with multipart/form-data we verify that request.getParameter(“submitButtonName”) return NULL value. Those because the …

Continue reading »

Apr 17

How to Iterate over HashMap in Java

HashMap is a powerful object in java made by a Key-Value association. Key and Value can be Object itself. So iteration could seem tricky, but Java offers us another object “Iterator” to performs iteration in a simple way. Just write code HashMap defaultTrans = new HashMap(); defaultTrasn.put(“it”,”Ciao”); defaultTrasn.put(“en”,”Hello”); defaultTrasn.put(“fr”,”Salut”); Iterator it = defaultTrans.entrySet().iterator();      while …

Continue reading »

Feb 06

How to compare Integer or String in Java

As powerful as amazing as nervy Java can bring you to next level. One of the simplest and most used operation in any programming language is comparison of string, integer or objects. In java we generally perform object comparison; this is because almost every thing is an object in Java. So, if your experience come …

Continue reading »

Jul 27

How-to get CentOS version

Really simple to get your CentOS version. Just type in your shell cat /etc/redhat-release You will get something like this CentOS release 6.3 (Final)

Jul 10

How to change category permalink in wordpress

You can use permalink in WordPress like this : %category%/%someotherstuff% If you a post assigned to more than one category permalinkin WordPress will select only one Category. It chooses the category with the lowest ID number .

Continue reading »

Mar 01

Howto install new locale in linux server for language localization

In previous article we describe how to figure out locale installed in your Linux server by using “locale -a” command . After we was surprised that the locale we need it’s not installed in our server, we have to find the correct command to compile our locale. As usual the solution is a line of …

Continue reading »

Older posts «