Sunday, January 13, 2013

Oracle must move faster against this

I have just read about the security issue that affects Java 7 update 10 running in web browsers and for more information about it you can visit this link for the topic description. Mozilla warned about this through the security director on its security blog. I hope it can be fixed so soon.

1- Oracle Security Alert for CVE-2013-0422.
2- Protecting Users Against Java Vulnerability at Mozilla Security Blog.

Wednesday, January 9, 2013

Get ready for JDC 2013

EGJUG has announced about the call for speaker for the JDC 2013 in a post in their website. I missed this amazing event last year but I will do my best this year to be able to attend it. As they say, It's the Java biggest conference in the Middle East and North Africa. I get inspired and I get much of knowledge by attending it. There are always new things to discover by attending this event. Hope to see you there too ;)

2- JDC 2013 call for speaker.

Friday, January 4, 2013

Retrieving a tree in Oracle database SQL

Assume that we have an Employee table with a self relation to represent that each employee has many  managers. There is a solution to retrieve the tree of all the managers for a specific employee in a hierarchical query as a tree in Oracle database SQL using the pseudocolumns. The pseudocolumns behave like a column table but not stored in the database and also are like functions but with no arguments. However, functions without arguments typically return the same value for every row in the result set, whereas pseudocolumns typically return a different value for each row.

The syntax for doing so would be:
SELECT [LEVEL] , column , expr ...
FROM table
[WHERE condition(s)]
[START WITH condition(s)]
[CONNECT BY PRIOR condition(s)]

So for example for employee and his bosses
SELECT ename , empno , mgr
FROM emp
START WITH empno = 7839
CONNECT BY PRIOR mgr = empno ;

Thanks goes to Ahmed Hisham for this information :).

1- Pseudocolumns in Oracle® Database SQL Reference (10.2).
2- Hierarchical Query with example.

Tuesday, January 1, 2013

Syntax Highlighter is enabled

I have enabled Syntax Highlighter in my blog. It's an open source Java Script client side code syntax highlighter. I can say that it's considered as the most used script for that purpose and there are many many people and companies who use it in their own blogs or websites. Check this link to know who else is using it. I have checked the themes provided here and I liked the eclipse theme so it's the one enabled here at the moment. Now it's time to say Hello World!.

 * @author Belal
public class HelloWorld {

  * @param args
 public static void main(String[] args) {
  System.out.println("Syntax Highlighter: Hello World!");

It's important to make sure that the code used with this script is character escaped. Postify would do that for you. So now I can say that the blog is ready to start posting some code snippets, stay around ;)

1- Blog post that shows the steps to enable Syntax Highlighter in your blog.
2- Another useful blog post.
3- Syntax Highlighter by Alex Gorbatchev.
3- Postify for characters escaping.
4- Moreover for characters escaping