Skip to main content

Posts

Showing posts with the label lecture notes Web technology

Using Google Analytics with R ( RGoogle Analytics)

Steps 1. Go to https://console.developers.google.com 2.  Create a new Project 3. Go to  API and select Analytics API  (used in this e.g.) 4. Go to Consent Screen and fill the appropriate product name and save 5. Go to credentials and creat a new client ID Make sure u enter the website URL properly 6. Now run the following R script R Script require(RGoogleAnalytics) client.id="xxxxxxxxxxxxxxxxxxx" client.secret="xxxxxxxxxxxx" token <- auth="" client.id="" client.secret="" p="">ValidateToken(token) query.list <- init="" p="" start.date="2014-01-01">                   end.date = "2014-02-10",                    dimensions="ga:date,ga:pagePath,ga:hour,ga:medium",                    metrics = "ga:sessions,ga:pageviews",                    max.results=500,                    sort="-ga:date",                    filters="ga:mediu

PHP (PHP: Hypertext Preprocessor)

PHP (PHP: Hypertext Preprocessor) What is PHP? PHP stands for PHP: Hypertext Preprocessor. It is a web development language written by and for web developers. The product was originally named Personal Home Page Tools. PHP is an open source, server side, HTML-embedded web scripting language usually used to create web applications in combinations with a web server, such as Apache. It enables the user to embed code fragments in normal HTML-page. It also makes the connection of a web page to server-side databases. It can also be used to create command-line scripts akin to Perl or shell scripts.   HTML-embeddedness PHP can be easily embedded within HTML-page. In other words, PHP pages are ordinary HTML pages that escape into PHP mode only when necessary. PHP codes are embedded with the help of canonical php tags.   <? php   ?>  Following is an example- <html> <head> <title> Greeting </title> </head> <body> <p> hello

CSS(cont.)

Type Selectors ·        Universal Selector CSS has a special selector (*) which means it matches every   element in the document. This selector is useful in when name of elements are unknown while developing the style sheet. For example:- * {color: green; } ·        Descendent selector This selector is also known as contextual selector. In style                   sheet it is applied to a particular element only when it lies inside a particular element. It provides a better way to apply style to very particular elements. This selector is consisting of one or more selector separated by white spaces. ·        Child selector This is similar to the descendent selector. It selects the element which is just immediate children of the specific element. It is denoted by the >. It can be writing as follow:- Ø Body > * - it select all the children of the <body>element Ø   Body > * > * - it select all the grandchildren of the <body>element Ø   B

html(conti.)

FRAME Html provides a facility to divide a web page into several blocks is known as frames. Each frame may display a separate web page and html document window in a one browser.  All browsers do not support the frames. The general use of frame is to have the menu in one frame and other frame contain the data. When user click on menu frame and data is displayed in corresponding frame.   Frame is started by using tags <frameset> and ends with </frameset>. Frame layout Frameset tag requires two attributes in which the screen is divided into rows and columns. Row-this attributes is used to divide page into multiple column or horizontally. Value of row is indicating the height of frame. For example-                 Rows=”20%,”                 Rows=”30%, 40%, 30%” Column- this attributes is used to divide page into multiple column or horizontally. Value of row is indicating the height of frame. For example-                   Cols=”20%,”                   Col

Fundamentals of CSS

CASCADING STYLE SHEET (CSS) Introduction Style sheets are powerful mechanism for adding different types of styles to any web document or web page. It allows web designer to improve and change the appearance of the web page in very efficient manner. It makes standard and uniformity throughout a web site. It enables us to control rendering of styles such as fonts, color, typeface, size, spacing, margins, and other aspects of document style. It is a style sheet language which specifies how to incorporate style information in a style sheet. These sheets are said to be cascade when they combine to specify the appearance of a web page, which indicate that several style sheet can be blended to a document. To embed style to a document <style>…. </style> tags are used. ADVANTAGES ·         Its main advantage is its ability to make global change to all documents from a single location. ·         The primary intention of CSS is to separate document presentation fr