Skip to main content

· 2 min read

One of the most common tasks while designing web pages is centering elements both vertically and horizontally.

To center a block (div, p, h1, and so on) horizontally, the only thing you have to do is to apply a margin auto to it. For example,

.horizontal-align {
margin:0 auto;
width:200px;
}

· 2 min read

In order to create our first html page, Hello World!, using Bootstrap, we will go to the official Bootstrap website at http://getbootstrap.com/ and download the latest 3.x.x version. Then will extract the archive and copy the following folders: css, fonts and js. Our project will have these folders and the main html archive at the same level.

· One min read

Suddenly, pulling a git project in eclipse from bitbucket I got the error:

cannot open git-upload-pack

I do not understand why this error occurs, but the solution is to configure the following parameter:

http.sslVerify false

In Eclipse we have to configure this parameter via Preferences > Team > Git > Configuration and clicking Add Entry...

· 5 min read

The Google Plugin for Eclipse lets you create, test, and upload App Engine applications from within Eclipse. The Google Plugin for Eclipse also makes it easy to develop applications using Google Web Toolkit (GWT), to run on App Engine or in any other environment. However, this plugin doesn't use Maven. In this post we are going to explain how to manage dependencies in a GAE project using Eclipse and Maven.

· 4 min read

After reading several books and web pages related to App Engine Datastore, I have decided to write this brief post explaining the basic ideas behind this Datastore, leaning mainly on the book Google App Engine Java and GWT Application Development and information that you can read at https://cloud.google.com/appengine/docs/java/storage.

App Engine Datastore is a schemaless NoSQL datastore with automatic caching, a sophisticated query engine, and atomic transactions. It is based on Google's Big Table design.

The Datastore's design has a focus on scalability and it is not a relational database. This design allows its data to be partitioned, or sharded, and it is distributed in a way that makes partitioning data and performing queries extremely efficient.

· 3 min read

In this post, we'll describe how to deploy an application to Google App Engine.

The first step in deploying an application require that you create a Google developer account. To start th process of registering an application ID, follow this link: https://appengine.google.com For that, you will need to have previuosly a Google Account or have a Google Apps account. In the latter option, you will have to use the link https://appengine.google.com/a/<YOURDOMAIN.COM>/, where YOURDOMAIN.COM is replaced with your actual Google Apps domain name.

· 2 min read

According to Java Concurrency in Practice and other sources of information main differences between Timer and ScheduledThreadExecutor are:

  • Timer can be sensitive to changes in the system clock, ScheduledThreadPoolExecutor isn't
  • Timer has only one execution thread, so long-running task can delay other tasks. ScheduledThreadPoolExecutor can be configured with any number of threads. Furthermore, you have full control over created threads, if you want (by providing ThreadFactory)
  • Runtime exceptions thrown in TimerTask kill that one thread, thus making Timer dead :-( ... i.e. scheduled tasks will not run anymore. ScheduledThreadExecutor not only catches runtime exceptions, but it lets you handle them if you want (by overriding afterExecute method from ThreadPoolExecutor). Task which threw exception will be canceled, but other tasks will continue to run.

· 2 min read

Parsing XML is a fairly common task and it is relativily easy because you can use quite a lot of parsers. However, parsing a XSD Schema file is not an easy task. You can parse it as a regular XML, but transform all elements and attributes into java objects are rather difficult. You can use tools, such as XSOM, but it doesn't seem to be maintained anymore.

· 4 min read

When you are developing a PHP Web Application, many times you need it to be dynamically available in several languages. One solution for this is to enable the Gettext PHP extension into PHP itself. If you are using a WAMP, XAMP or MAMP distribution the only thing you have to do is removing the semicolon of the gettext.so or gettext.dll extension that you can find in php.ini.