Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Tuesday, April 16, 2013

Box Model - CSS Tutorial

After I want to get better my skills as Web Designer, I decided to study again all concepts of CSS! And there is one thing I consider very important: Box Model.

But what is Box Model and why is it very important?
The Box Model is a box that wraps around HTML elements. It is very important because it allow the design become more organized and clean.

What consists Box Model?
Box Model consits of four things:

  1. Margin - Clears an area around the border. The margin does not have a background color, it is completely transparent;
  2. Border - A border that goes around the padding and content. The border is affected by the background color of the box;
  3. Padding - Clears an area around the content. The padding is affected by the background color of the box
  4. Content - The content of the box, where text and images appear

Tuesday, September 25, 2012

MySQL Tutorial - How to calculate time correctly

A database server has a database called "Cinema" which has a table called "Movies". This table has next fields:

  • ID
  • Name
  • Duration

Hereafter, you can see table 'movies':

movies_id movies_name movies_duration
1 Movie I 02:23:34
2 Movie II 01:44:56
3 Movie III 02:56:34

To calculate duration of all movies, we could write:

SELECT sum(movies_duration) FROM movies;

But it is wrong!

Result:

sum(movies_duration)
62424

To fix this problem, it is necessary convert time to seconds with next SQL statement:

SELECT time_to_sec(movies_duration) FROM movies;

Result:

time_to_sec(movies_duration)
8614
6296
10594

And next, use function SUM() to calculate duration of all movies

SELECT sum(time_to_sec(movies_duration)) FROM movies;

Result:

sum(time_to_sec(movies_duration))
25504

Finally, convert the sum (in seconds) to time using the next statement:

SELECT sec_to_time(sum(time_to_sec(movies_duration))) FROM movies;

Result:

sec_to_time(sum(time_to_sec(movies_duration)))
07:05:04

Thus you can calculate time correctly using three MySQL functions:

  1. TIME_TO_SEC(...)
  2. SUM(...)
  3. SEC_TO_TIME(...)

Saturday, September 1, 2012

JavaScript Tutorial - How to print a Web Page

I was working on my project called "Project Manager". And I was needing to create a link to print a web page. After I was researching on Web, I found a small code written in JavaScript.

<a href="javascript.window.print()">Print</a>

Clicking on link, it will show up a box dialog of printer.

Tuesday, August 21, 2012

Oracle PL/SQL


For professional reasons, I was forced to study Oracle PL / SQL.


PL/SQL is an imperative 3GL that was specifically designed for the seamless processing of SQL commands. It provides specific syntax for this purpose and supports exactly the same datatypes as SQL. Server-side PL/SQL is compiled and stored in Oracle Database and Oracle runs within the executable. It automatically inherits the robustness, security, and portability of Oracle Database.

To study Oracle PL / SQL, I found a great website and I highly recommend.

Tuesday, May 1, 2012

How to install Oracle Database Express Edition


I heard talk about technology Oracle PL/SQL but I never tried it. To study PL/SQL it is necessary install software Oracle Database 11g Express Edition. Hereafter you have 3 minutes video showing all necessary steps to installation correct.