Skip to main content

Posts

Showing posts from 2010

G-Jordan Day-1 Event By Google on December 12, 2010

Today, Google run its first event G-Jordan in Jordan at Hayat Amman hotel, about 30 Googlers where there, presented sessions and talked about latest technologies from Google, they also talked about HTML5, Cloud Computing, Open web standards, Chrome Extensions. Attendances where professors from Jordan universities, and also students from different universities and countries like Lebanon, Palestine, Bahrain and more according to invitations sent by Google. Really it was an amazing event, valuable, and successful. Anas Jaghoub P.S here some of photos from the event: Nelson Mattos - VP, EMEA Product & Engineering Sebastian Trzcinski-Clément - Developer / Industry Relations Lead, Middle East and North Africa What you speech is what you see and what is Google translate :)) Chris DiBona - Open source and public sector programs manager and Me(Anas Jaghoub)   Luiselle Mozze a Googler and me (Anas Jaghoub) Luiselle Mozze, Me (Anas Jaghoub), and my friends Mohammad Jaradat

Statistics for November visits

Here is the statistic for November visits from the period November 8,2010 to December 7, 2010. 431 unique visits distributed as followed: Jordan                             241 United States                  131 Sri Lanka                         12 Russia                             12 Palestinian Territories     10 France                              7 Norway                             5 New Zealand                     5 United Kingdom                4 Israel                                 4 ------------------------------------------- Best Wishes, Anas Jaghoub

Cloud Computing Session at AABU–IT College on 2-DEC-2010

On 2-DEC-2010, I’d presented a session about “Cloud Computing” on the college of IT at Al-Al Bayt university, the session focused on introducing the concept of cloud computing, why cloud computing, area of usability, examples on cloud computing, advantages and limitations of cloud computing. Attendances were students of I.T college in both departments Computer Science and Computer Information System, In addition to the head of department of Computer Science Dr. Sa’ad Bany Mohammad. Here the link for the ppt slides of the session on Google Docs: Cloud Computing Session another link on SkyDrive: Cloud Computing Session Anas Jaghoub P.S, Below Images from the session:

CSS Tutorial – Lesson 1 Part II

In the previous lesson we learned how to define a CSS rule, and we had shown that a CSS rule consists of two parts a selector and a declaration. In the previous lesson we talked that in the selector we might write the html element we want to style. In our lesson today, completing with CSS rules, we’ll see now other types of selectors, The ID selector: CSS allows you to specify a style for a single element, regardless to its tag, depending on its id attribute. as you know, in XHTML each element has an id attribute, and this id must be unique. To define a CSS rule depending on the ID selector below the syntax for it: Example: #theID { font-size: 14px; } Notes: The above CSS rule will be applied for any element whose id = theID, The ID selector must start with #. The Class Selector: Unlike the ID selector, the class selector allows us to define a rule for multiple elements regardless to their tag. The class selector enables us to define a common style for common elements,

CSS Tutorial – Lesson 1 Part I

What is CSS? CSS refers to Cascading Style Sheets, In general styles define how to display elements on the web page. Why CSS? By CSS, we can define a style for a web page and make it standard for all web pages on the website, changes to the style will be applicable to all pages on the same time. another point of view, CSS responsible for formatting elements of a page, this feature makes the HTML/XHTML responsible on defining the content of the page, and does not have a role in formatting the elements. CSS created by W3C to solve a problem of HTML/XHTML, suppose you want to design your page in some specifications for fonts and colors used, then without using CSS, you have to write these specification for each page you want to apply this design to it, moreover, you might need to apply same design specifications on two different places on the same page, without CSS, you have to write it where ever you want it, this will make page design more complex and poor. Syntax: A CSS rule cons

XHTML Tutorial–Lesson 1 Part IV

Summary In this lesson, I’ll try to summarize all what we learned in the previous lessons about XHTML. Remember that XHTML refers to EXtensible Markup Language, which is a cleaner version of HTML, defined as an XML application, recommended by W3C, and compatible with all web browsers. Remark that all XHTML elements are written in lower case. Note that XHTML elements must be nested correctly and be a well formed structure. Remark that all XHTML tags must have a closing tag. Remember that empty tags are closed by a space followed by a forward slash then greater than symbol  />. Note that attribute values must be enclosed within double quotes. Attribute minimization is not allowed. Each XHTML document must start with a DOCTYPE declaration. Finally, The structure of XHTML document is, DOCTYPE declaration, followed by html tag, followed by a head tag, followed by title, followed by body tag. Remember that this structure is mandatory and not optional. End of XHTML Tutorial, hop

XHTML Tutorial–Lesson 1 Part III

Document Type Definition DTD As we said in the previous lesson, DTD is mandatory for each XHTML document, and we saw the structure for each XHTML document, that consists of DOCTYPE, html, head, title, body. In other words there is three parts that each XHTML document contain, The DOCTYPE definition. The head section. The body section. Remember: DOCTYPE definition is the first thing to be written in the XHTML document. Below an example for an XHTML document: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Welcome</title> </head> <body> <h1>Welcome To my page!</h1> </body> </html> Notes As we said before, each XHTML document must start with a DOCTYPE definition, that describes the syntax of a web page, and the allowed syntax to be used, In other words it specifies allowed tags to be used

XHTML Tutorial–Lesson 1 Part II

XHTML vs. HTML Continuing with differentiating XHTML from HTML, in this lesson am going to mention some more rules for XHTML that differs it from HTML. · Attribute values must be enclosed within double quotations. · Attribute minimization is not allowed. · Each XHTML page must have a DTD (Document Type Definition) that describes elements used in the page. Below examples that illustrate the difference between XHTML and HTML for the above points: In HTML, you might write something like this: <font color=red>Anas</font> In XHTML it is not valid, each attribute value must be enclosed within double quotations. <font color=”red”>Anas</font> For the second point, attribute minimization is not allowed in XHTML, For example it is accepted in HTML to write <option checked> Or <frame noresize> Or <input disabled> All the above are not allowed in XHTML, you cannot abbreviate or minimize attributes, To be written correctly in XHTML, it must be writ

XHTML Tutorial–Lesson 1 Part I

Preamble: This tutorial expects that you’ve the basics of HTML 4.01, and supposes that you are familiar with its syntax and purpose. In this tutorial I’ll try to introduce XHTML concept and why we should use XHTML instead of HTML, we’ll talk about differences between HTML and XHTML. We’ll talk about some of web standards that we have to follow when developing a web-based applications. What is XHTML? XHTML stands for EXtensible Hypertext Markup Language, it is almost identical to HTML 4.01, but it is a cleaner version of HTML. We might look to XHTML from a point of view that it is an HTML defined as an XML application. Above all XHTML is recommended by W3C, and though it’s compatible and supported with all web-browsers. XHTML consists of all HTML 4.01 elements combined together with the structure of XML. Why XHTML? The problem of HTML where on no standardization for web browsers, many web browsers around the world, each browser implemented in a way differs from other browsers,  in

PHP Tutorial–Lesson 5: Introduction to PHP- Part III

PHP and MySQL •Our previous application displays all employees in one web page, how about displaying information about one employee? •To display information about a single employee we have to specify some information about this employee, such as his id. •Our next application, will enhance the previous one, and improve it to display information for a single employee. Example: <?php // inquery.php $form=‘<form name=“employee” method=“get” action=“employee.php”> Employee No: <input type=“text” name=“id”><Br> <input type=submit value=“Go”> </form>’; echo $form; ?> <?php // Employee.php // last modified 13/oct/2009 require(“../include/config.php”); If(isset($_GET[‘id’])) $id = $_GET[‘id’]; else die(“Unexpected value for employee id”); $sql = “SELECT * FROM employee WHERE id=$id”; $result = mysql_query($sql); If(!$result) die(“MySql Error: <br>“.mysql_error()); If(mysql_num_rows($result) == 0) echo “No information available<Br>”; else { $

PHP Tutorial–Lesson 5: Introduction to PHP- Part II

PHP and MySQL MySQL query through PHP script: •Remember rule of single/double quotes when dealing with non-php script inside php script? We’ll apply it now with MySQL queries. •Each MySQL query will be stored in a variable called for example $sql. •We’ll use a built-in function that executes the query, the function is mysql_query(), and takes as parameter $sql value i.e. MySQL query. •The returned value of this function is true or false, we’ll store it in a variable called for example $result. •Finally, we’ll check whether your query executed successfully or not. •These steps will be followed at each time we want to run MySQL query using PHP. •We’ll suppose that you saved your config.php file that includes your connection configuration in an external directory called include. for more information on how to configure connection to MySQL server revise Previous Lesson on the Link: PHP Tutorial–Lesson 5: Introduction to PHP- Part I Example: <?php // Employees.php // Created

PHP Tutorial–Lesson 5: Introduction to PHP- Part I

PHP and MySQL •Our previous examples focused on how to write correct MySQL syntax. •Now, we are going to learn how to take advantages of MySQL queries in our PHP applications. •PHP, offers number of built-in functions that deal with MySQL db. •These functions communicate with MySQL db. and allow us to run MySQL queries through PHP Script. Connectivity to MySQL •Before getting access to database, we had to start a connection with the server where it lies on. •To start a connection between your script and db. PHP offers function mysql_connect(). •This function takes three parameters, first one is MySQL server address. Second one is username for the user of the db. And last one is password for that user. Example mysql_connect(“localhost”,”anas”,”1234”); •A call to mysql_connect() will start a connection with the specified MySQL server and username and password. •This function returns a value of true or false. •If the connection succeeded, then it returns true, so you can com

PHP Tutorial–Lesson 4: Introduction to PHP- Part IV

Queries INSERT: we had created our db, then created our table, now it is time to insert records to the table. •Records: in our table employee, a record is an employee information. •To insert record into our table, or in other words to add an employee to the table. We use the query: INSERT INTO. •Syntax: INSERT INTO table_name (col1,col2,…) VALUES (val1,val2,…) •Notes: •INSERT INTO instructs your db to add a new record. •table_name specifies the table you want to add a new record inside. •(col1,col2,…) specifies attributes you want to add values to it. •VALUES(val1,val2,…) specifies values of attributes you want to add. •The order here is very important. Example: INSERT INTO employee (name, socialNo, department, jobTitle, salary, telephone) VALUES (“Anas”, 1234, ”IT”, ”Programmer”, 1000, ”07x-xxxxxxx”) Notes: •NOT NULL fields must be filled on each record insertion. •NULL fields are optional, you might assign a value to it or not. •AUTO_INCREMENT: it is optional to assign

PHP Tutorial–Lesson 4: Introduction to PHP- Part III

•Today, I’ll put you in a project, and try to analyze it step by step   •Suppose, a customer has a company, and asks you for a method for storing his employee information, and accessing it when needed. •You should put in mind, that your customer in best case has minimum knowledge about databases, and all what he need is what, not how. •Its your turn to ask the customer, about nature of data he wants to collect. •Let’s say the customer told you he wants to store employee name, social number, department, job title, salary, cv, telephone, address. •These little words from your customer, helps you imagine how your table structure will look. Analysis Step: •Analysis step simply means determining proper data types for data you are going to collect. •Let’s start: •Employee name: name its proper data type is string, it is possible to make its type text or longtext, but we want to design quick, suitable, and with the less cost that meets requirements for our table. •Social number: soc

PHP Tutorial–Lesson 4: Introduction to PHP- Part II

  Getting Started with MySql: •Here am going to demonstrate MySql queries, and all examples demonstrate only how to write correct MySql syntax. •So you might run these commands at your MySql db on your own host, at a window called SQL, and fill your query on the text box then click run. •At end of this Lesson, you’ll get PHP built-in functions that deal with MySql db, and be able to run MySql query through PHP script. Logging to MySql through your localhost server: In order to log in to your MySql db that it is installed on your localhost, simply open your internet explorer, on the address bar, write: http:localhost:port/phpmyadmin where port is the port number where your web server installed on it. for example suppose your web server installed on port number 81 then the address will be: http://localhost:81/phpmyadmin remember, you had specified the port number of your web server at installation time. after that then a prompt will ask you for username and password of MySql adm

Statistics for last month visitors

Here is the statistic for last month visitors to my blog at blogger,  from the period: 2010 Oct 10 – 2010 Nov 8 353 unique visit distributed as followed: Jordan                                256 United States                     77 France                                4 Israel                                   4 Palestinian Territories        4 Germany                            2 United Kingdom                 2 Russia                               2 Kuwait                               1 Lebanon                            1

PHP Tutorial–Lesson 4: Introduction to PHP- Part I

  PHP and MySql db What is a database? •Database is a collection of related tables. •Each database contains from one or more tables. •Each table consists of columns and rows. •Columns are properties of the table. •Rows are records of the table. •Each table is identified by a name. What is MySql? •MySql is a database. •MySql is the most popular OPEN-SOURCE database system. •Why PHP and MySql? •When we talk about PHP and MySql, actually we are talking about great innovations and useful tools help you in your web applications. •Both are OPEN-SOURCE. •When you deal with MySql in your PHP application, you give your application more features, such as full dynamic editing, ability to manage, add, update, delete, and more. •Save important information, and access it at any time. Example on db table: •A table called employee might look like this: Basic Data Types In MySql: •Each column in a table should has a type, that specifies the type of contents inside it. •Type de

PHP Tutorial - Lesson 3: Introduction to PHP - Part IV

Functions •           Latest topic to be discussed in this lesson is functions. •           The real power of PHP comes from its functions. •           In PHP there are more than 700 built-in functions. •           In previous lessons, we discussed some of built-in functions that php offers, such as function time, date, isset, unset, session_start(), mb_strstr, mb_strlen… etc. •           Now we are going to discuss, user-defined functions, which you are as a programmer build it yourself. •           Functions have an advantage of keeping the browser from executing your script while page loading. How? When you put your script in a function, then it will be executed only when you call the function. How to create a function? •           Syntax: •           function functionName() •           { •           Code to be executed. •           } Example: <?php function printName($var) { echo “<font style=‘font-size:14px’> $var.”</font><Br>”; } ?> Function Returns

PHP Tutorial - Lesson 3: Introduction to PHP - Part III

PHP and HTML •           At beginning of our php tutorial, we said that php can embed any language inside it such as html, and it might work like (CGI). •           Now, we are going to work with graphical user interface (GUI). •           Hope you’ll enjoy your time while working with something great, useful, and simple.       One of the most important things, that makes user like your site, and come back again, the design of your site. It is not a secret, when I tell you that all php web applications depends completely on html and some JavaScript, that makes your site active, and finally, some CSS styles. <?php echo ‘<font style=“font-size:15px; font-family:arial; color:#000066; font-weight:bold;”>Welcome to my site</font>’; ?> •           When writing php code that embeds other scripting language, hope you follow these rules. •           When you embed non-php script with php, we deal with non-php script as a string. •           So we might store the code with a