Computer Networks & how Data Communication work?

January 17, 2010 Add Comment

Computer Networks & how Data Communication work?


When we communicate we are sharing information. This sharing can be local or global. Between individuals, local communication usually occurs face to face, while global communication take place over distance. The term telecommunication, which includes telephony, telegraphy, and television, means communication at a distance (tele is Greek for "far").

Data communication implies the transmission of information between two devices through a transmission medium. Data communication is considered local if the communicating devices are in the same building or a similarly restricted geographical area, and is considered global if the devices are farther apart.

A data communication system may be represented by way of a simple conceptual model as shown in below Picture:





The effectiveness of a data communication system depends on the three fundamental characteristics:

Delivery. The system must deliver data to the correct destination Data must be received by the intended device.

Accuracy. The system must deliver the data accurately. Data that has been altered during transmission and left uncorrected is unusable.

Timeliness. The system must deliver data in a timely manner. Data delivered late is useless. In the case of video and audio, timely delivery means delivering data as it is produced, in the same order, that it is produced, and without significant delay. This kind of delivery is known as real time transmission.

How to Install Web Server with XAMPP

January 10, 2010 Add Comment
How to Install Web Server with XAMPP


If you want to install and set up a dynamic web server with Apache, a lot of applications such as Apache web server, mySQL database, PHP and Perl scripting language, and not to mention important extensions and tools to manage the web server’s applications. It’s not a easy and simple task. But luckily, there is XAMPP from Apache Friends.

XAMPP is a collection of free software applications for installing and using the Apache Web server. There are different combination of applications depending on which XAMPP distributions. Currently there are four type of XAMPP distributions available: XAMPP for Linux (previously known as LAMPP), XAMPP for Windows, XAMPP for Mac OS X, XAMPP for Solaris. Typically, XAMPP is a full featured AMPP (Apache MySQL, PHP, Perl), an Apache distribution that includes the Apache Web server, MySQL database, PHP, Perl, FTP server and phpMyAdmin, with several other important and commonly used extension built-in, such as SSL.

To install and get your web server running, just download XAMPP in your OS flavour, extract it and then just start the web server. The Windows version even comes with a installer version, making life even simpler, making the installation of web server in Windows just a few clicks. You can get all the simple installation instructions at the XAMPP web pages where you download XAMPP. Beside, XAMPP for Windows also offers lite version, where it is the smaller bundle of XAMPP recommendable for a quick work around with PHP and MySQL.

Best of all, XAMPP is free, and so do the package of software applications that come with it.

HTML and Blogger templates

January 09, 2010 Add Comment

HTML and Blogger templates


his text presents basic concepts about the structure and HTML templates blogger, but without getting too by INFORMATIQUES. Serve to support the description of other techniques bloguísticas.

Content:
Structure of an HTML document
Concept of client / server
CSS and DIV
HTML or XML?
Structure of a template blogger
Structure of containers of template
Conclusion
Structure of an HTML document
An HTML document is a plain text document which mingle commands to the browser to interpret this text as you are reading. Generally, the structure of an HTML document is as follows:

<html> 
<head> 
..... 
</ head> 
<body> 
..... 
</ body> 
</ html>


In this example we can see that:



The dots are content and miscellaneous commands, the rest are HTML commands;


HTML commands (called HTML tag or simply tag) are contained between <and> characters.


An HTML command is formed by a part of "opening" command (such as "<html>") and a "closing" command (such as "</ html>"). The opening part of a command begins with "<", followed by him command itself (characters up to the first space or by the ">" sign), continues with parameters specific to the command, and ends with ">". The closure part of the command begins with "</", followed by the same characters you command the opening and ending with ">." Thus, the command lines 1 and 8 form a respective pair of opening and closing.


Although not shown in the example, some commands close themselves, as is the case of the command that inserts an image: <img ..... />. These commands start "<", follows them the command itself (characters up to the first space), continue with specific parameters of the command and end with "/>".


An HTML document necessarily begins with line 1 and ends with the line 8. Lines 2 to 4 and rows 5 through 7 form two main blocks. The first block contains instructions for the browser and the second block contains the browser will display a page. Before the first line should contain information about which version of the document is being built, which is done with the command "<! DOCTYPE HTML PUBLIC .....>."


There are specific controls for each of these blocks.


Generally, HTML commands that contain the opening and closing can be chained within each other as long as they respect the order "first to open, last to close" (see the commands in lines 5 and 7).



Concept of client / server


Called client device where the HTML document will be shown (the browser, usually) and is called the server software that runs on the computer that can be accessed by a URL (the http://bloger.com, for example).


When entering in the browser the address of a site, the server processes the request and returns a result. Next, the browser receives the request and may perform additional processing until finally the result is shown. Example:


I type in the browser http://comptechdigg.blogspot.com;


Primir to enter, the browser sends the request to the blogger's blog home page;


blogger, containing the texts of posts in a database, read the blog settings, get the posts to show and mix them with a template that is in use. Then returns the result to the browser;


the browser handle the response returned by the blogger and interprets the response received. Besides the content to display, between commands may be formatting commands, positioning and further processing (with javascript). Having javascript to be processed, the browser executes it, can profoundly alter the response returned by the server;


finally the result is presented to the user.



CSS and DIV


The formatting and placement of the contents of an HTML page can be made with CSS, placing the class attribute in the HTML element. The properties defined by the class of an element will be valid for that element, and for those who are in it (unless they are redefined by another class or specific formats).


DIV is a structural element of HTML and mainly serves to define the position of content on a page. A DIV associated with a class allows you to position the contents and assign them to specific formatting.


HTML or XML?


An HTML document is a particularization of an XML document. This area will not go into specifics but who want to know more you can read here: http://pt.wikipedia.org/wiki/Xml


Structure of a template blogger


One blogger template is a special document in XML format, similar to an HTML document but with additional commands. A template can have various structures, and the following blocks an approach quite common:



Header (header);


Area posts (posts area);


Component area (widget area);


Footer (footer).

<? Xml .... ?> 
<! DOCTYPE ... > 
<html .... > 
<head> 
<b:skin> <! [CDATA [/ * 
# outer-wrapper { 
.... 
# header-wrapper { 
.... 
# main-wrapper { 
.... 
# sidebar-wrapper { 
.... 
# footer-wrapper { 
.... 
]]> </ b: skin> 
... other settings ... 
</ head> 
<body> 
<div id='outer-wrapper'> 
<div id='header-wrapper'> 
..... 
</ div> 
<div id = 'main-wrapper' > 
..... 
</ div> 
<div id='sidebar-wrapper'> 
..... 
</ div> 
<div id='footer-wrapper'> 
..... 
</ div> 
</ div> 
</ body> 
</ html>


Lines 1 and 2 classify the template. From an existing template and leave them as they are.


Lines 3-40 are the HTML to send to the browser. Contains commands that are interpreted by the blogger before sending the response to the client.


The block head of the HTML document is between the lines 4-23. This block is where files include javascript, CSS and CSS which defines the structural blog (lines 5-21). The CSS structural blog defines a set of classes (containers), positioning the blocks as the previous figures in specific locations of the HTML page.


Between the Lines 00:39 is contained content of the blog itself (header, posts, sidebar, and footer). In the figure are shown blocks corresponding to the first of the three previous figures. Highlight:



the various blocks of the template are contained between DIV tags;


each DIV has a property "class" that identifies the corresponding CSS class d. This class is defined in the CSS block head.



The structure of the template containers DIV Within each of the containers forming the template, as there are blocks which follow:




<B: section ... > 
<b: widget id = 'HTML1' type = 'HTML' ... > 
<b:includable id='main'> 
   ... content ..... 
</ b: includable> 
</ b: widget> 
</ b: section>


The "section" group blocks such as multiple columns in the sidebar. Within each are a "widget" which is the "gadget" that shows the contents of the section. Finally, within the widget are "includable" which are the actual content: text, images, javascript, etc..


The widget accept specific content based on their "type" and must have an identification (ID) unique throughout the template. This identification has to be formed by the following type of number.


Widgets can be of the following type:



  • BlogArchive
  • Blog
  • Feed
  • Header
  • HTML
  • SingleImage
  • LinkList
  • List
  • Soon
  • BlogProfile
  • Navbar
  • VideoBar
  • NewsBar

Google Alternative Advertising (ads) Networks

January 07, 2010 Add Comment

Google Alternative Advertising (ads) Networks




Why people look for adsense alternatives, it may be because of various reasons like many of the times google bans some adsense account, or some of the websites do not comply with the policies of the google adsense for a publisher or may be its hard for someone to to get their adsense account activated as it is not that easy to get adsense account approved by its two step verification process, So these people try to find google adsense alternatives in order to convert their website traffic to cash.Alternatively many people look for adsense alternatives as according to google policies you can only display a limited number of google ads on a single page of a website, so in order to get better conversion from the websites some people prefer placing ads other than google ads.

Google being the number one in the internet world in many of the fields including search engine and in providing organic traffic by the method of google adsense or adwords with the highest conversion rate for the adsense publishers is the first choice of all the advertisers for promoting their website or business and publishers for displaying google ads on their website to earn profit.Also the ad placement for adsense is very simple and the ads are always related with the content of the website makes the CTR(click through rate) better makes google even better in the same field.



Here is the list of the 3 best adsense alternatives you might find useful
So if you are having a blog or website of yours and you want to make money from that but you are not able to use adsense or your google account is not approved or even you want to place some more ads other than google for some extra income here is the list of  top 6 google adsense alternatives.

1)Chitika


Just like adsense chitika is also a company that allow publishers to display ads provided by chitika on their pages and earn money from their blogs, and somewhat like adsense the ads provided are related to the content but unlike adsense these ads are not determined by the content of the website but are determined by the search term by which come to the website using the search engine.

Chitika provides you the authority to place ad units according to your interest from the various size of ad units available for the publishers to display.Chitika also allows you change ad placement changing ads color fonts etc.

Chitika offers you to withdraw your earnings for as low as 10$ if you want to receive money by paypal and if you want to receive money by check then you have to reach a minimum amount of 50$.



Things we don’t like with chitika

Instead of so many features provided by the chitika its conversion rate is very low as compared to adsense, ads are based on searched terms rather than the content.

2)Bidvertiser


Bidvertiser is another website which can be used as an alternative to adsense, just like chitika it also offers a low minimum payout of 10$ if paid by paypal. Bidvertiser is one the very old company in the advertising field. Bidvertiser offers a unique method of placing ads, it provides the ads of the person or company which offers the highest bid on the specific keyword or content.It is generally a very cheap kind of advertising if you want to advertise your website or product on the other hand it is also having very less payment scale as per the clicks.

Things we don’t like with bidvertiser

Bidvertiser offers a very low CPC (cost per click) and the traffic generated for the advertisers is not purely organic.

The ads of bidvertiser can’t be used with adsense or the bidvertiser account gets banned so it is not an option for the people who wants to display bidvertiser ads along with adsense to earn extra income.

3)Infolinks


Infolinks is another alternative to be used with adsense, the ads of Infolinks are purely contextual and can be used along with the google adsense so it is good for the publishers already using google ads on their website and are looking for another source for ad placement on their website.However the infolinks do not provide good CPC as adsense do but as it provides a variety of ads to be shown like pop-up ads and text ads so can be easily combined along with ads from other networks.



Conclusion


There are a lot of other networks providing a substitute to google adsense with various features for advertisers and publishers, but still i will recommend to use adsense for both advertisers as there is no better conversion then google adwords provide and traffic is purely organic and for publishers too as it is the best network all over the web providing the highest CPC and the ads are automatically generated according to your content.

However if you are not able to use adsense you can use any of the alternatives above according to your comfort.

Comment Blocks in PHP

January 02, 2010 Add Comment

Comment Blocks in PHP


PHP supports C language, C++ programming language and Unix shell-style (Perl style) comments. In PHP, // or # is used to make a single-line comment or /* and */ to make a large comment block that spans several lines.

For example:

<?php

echo ‘This is a test’; //This is a single-line C++ style comment
echo ‘This is another test’;#This is another single-line shell-style comment
/* This is a multi line comment
Second line of comment */

?>

The “one-line” comment styles comment to the end of the line or the current block of PHP code, whichever comes first. This means that HTML code after the PHP script block (PHP mode broken with ?> and returns to HTML mode after end of PHP code block) will be printed. If the asp_tags configuration directive is enabled, it behaves the same with // %> and # %>. However, the </script> tag doesn’t break out of PHP mode in a single-line comment.

For example,

<h1>This is an <?php # echo ‘simple’;?> example.<h1>
<p>The header above will say ‘This is an example’.</p>

C or C++ style comments end at the first */ encountered. Any nested /* and */ style comments will cause error, and it’s pretty easy to make this mistake if you are trying to comment out a large block of code.

<?php

/*
echo ‘This is a test’; /* This comment will cause a problem */
*/

?>

The PHP comments is useful when you want to comment or disable a large portion of HTML. Instead comment the HTML code line by line, put the whole HTML block into PHP code block (i.e, add <?php and ?>) and comment with /* and */.