Monday, September 23, 2013

DHTML Basics



What is DHTML

lDHTML is the art of making HTML pages dynamic!
lDHTML is a combination of technologies used to create dynamic and interactive Web sites.
lTo most people DHTML means a combination of HTML, Style Sheets and JavaScript.

Features
lChanging the tags and properties
lReal-time positioning
lDynamic fonts (Netscape Communicator)
lData binding (Internet Explorer)

Changing the tags and properties
lThis is one of the most common uses of DHTML. It allows you to change the qualities of an HTML tag depending on an event outside of the browser (such as a mouse click, time, or date, and so on). You can use this to preload information onto a page, and not display it unless the reader clicks on a specific link.

Real-time postioning
lWhen most people think of DHTML this is what they expect. Objects, images, and text moving around the Web page. This can allow you to play interactive games with your readers or animate portions of your screen.

Dynamic Fonts
lThis is a Netscape only feature. Netscape developed this to get around the problem designers had with not knowing what fonts would be on a reader's system. With dynamic fonts, the fonts are encoded and downloaded with the page, so that the page always looks how the designer intended it to.
Data binding
lThis is an IE only feature. Microsoft developed this to allow easier access to databases from Web sites. It is very similar to using a CGI to access a database, but uses an ActiveX control to function. This feature is very advanced and difficult to use for the beginning DHTML writer.
Advantages of DHTML
l1. Fast and Zippy: - dHTML loads content on fly. Your whole page does not loads but only the content part that needs to be altered, so saving the crucial time for the users and giving the snazzy look to the website.
l2. Plug-ins, we don’t need them:- dHTML uses most of the features already present in the browsers, so there is no need to download any sort of Plug-ins.
Advantages of DHTML
l3. Great Utility:- The dynamic features possessed by dHTML are helping web designers to create Web pages that posses compact looks, downloads fast, have graphic effects, provides greater functionality and can hold much more text or content all at the same time.

Disadvantages
lUses script languages which mean
–All variables are variants
–Error handling is limited
lDebugging can be awkward
lCostly Editing tools: - although dHTML provides great functionality but the editors’ available for that in market are pretty expensive. Examples of dHTML editors are Dreamweaver and Fusion.
lLong and Complex coding: - dHTML coding is long and complex. Only the expert Javascript and HTML programmers can write them and edit them with good degree of functionality.
lBrowser Support problems: - dHTML suffers from browser support problems for different browsers. For example, a code written for Netscape might not work in Internet Explorer and Vice-Versa. The problem arises due to the different features of browsers.


What is HTML?
4Telling the browser what to do, and what props to use.
4A serises of tags that are integrated into a text document.

Tags are ;
4 surrounded with angle brackets like this
* <B> or <I>.
4Most tags come in pairs
* exceptions: <P>, <br>, <li> tags …
4The first tag turns the action  on, and the second turns it off.
4The second tag(off switch)  starts with a forward slash. 
* For example ,<B> text </B>
4can embedded, for instance, to do this:
* <HEAD><TITLE> Your text </HEAD></TITLE> it won't work.
* The correct order is <HEAD><TITLE> Your text </TITLE></HEAD>
4not case sensitivity. 
4Many tags have attributes.
*  For example, <P ALIGN=CENTER> centers the paragraph following it.
4Some browsers don't support the some tags and some attributes.

Structure of HTML
•HTML documents are structured into two parts, the
    HEAD, and the BODY
•The head contains information about the document
    that is not generally displayed with the document,
    such as its TITLE.
•The BODY contains the body of the text, and is
    where you place the document material to be
    displayed. Elements allowed inside the HEAD,

Basic HTML Document Format


How to Create and View an HTML document?
1.Use an text editor such as Editpad to write the document.
2.Save the file as filename.html on a PC. This is called the Document Source.
3.Open Netscape (or any browser) Off-Line
4.Switch to Netscape
5.Click on File, Open File and select the filename.html document that you just created.
6.Your HTML page should now appear just like any other Web page in Netscape.
7.You may now switch back and forth between the Source and the HTML Document
lswitch to Notepad with the Document Source
lmake changes
lsave the document again
lswitch back to Netscape
lclick on RELOAD and view the new HTML Document
lswitch to Notepad with the Document Source......

HTML Disadvantages
•Page numbers corresponding to the
   print are often not present
•May require multiple files
•May require on-line access

HTML Advantages
•Widely available
•Supports navigation by heading if properly tagged
•Works with a wide range of AT
•Known Web surfing concepts apply

XML Basics



XML

Acronym for Extensible Markup Language. An open standard for exchanging structured documents and data over the Internet that was introduced by the World Wide Web Consortium (W3C) in November 1996.

What is XML?

  • XML stands for EXtensible Markup Language
  • XML is a markup language much like HTML
  • XML was designed to describe data
  • XML tags are not predefined. You must define your own tags
  • XML uses a Document Type Definition (DTD) or an XML Schema to describe the data
  • XML with a DTD or XML Schema is designed to be self-descriptive
  • XML is a W3C Recommendation

The Main Difference Between XML and HTML

XML was designed to carry data.
XML is not a replacement for HTML.
XML and HTML were designed with different goals:

XML was designed to describe data and to focus on what data is.
HTML was designed to display data and to focus on how data looks.

HTML is about displaying information, while XML is about describing information.
Features or Goals of XML
1. XML shall be straightforwardly usable over the Internet.
When you write XML it should be readily available over the Internet. XML is not intended as a programming language for stand-alone systems, but rather to be used across the Internet for a wide variety of sources.
2. XML shall support a wide variety of applications.
The beauty of XML is that it was intended to be used for as many things as possible. This flexibility can sometimes make it more difficult to understand, but ultimately, XML can be used to describe a Web page about flowers or a database of car parts or nearly anything you can imagine.
3. XML shall be compatible with SGML.
SGML or Standard Generalized Markup Language, is the ISO standard on which all XML and thus XHTML documents are based upon. If a document isn't compatible with SGML, then it cannot be called XML.
4. It shall be easy to write programs which process XML documents.
XML was always intended to be easy to use and process. Because XML is based on human-readable text, this makes it a lot easier for programmers to figure out what is meant by the XML tags. This in turn makes it easier to write a program that processes those tags.
5. The number of optional features in XML is to be kept to the minimum.
Ideally, there would be zero optional features. Optional features cause problems because they are not guaranteed to be in any given situation. The more optional features there are in a system the more combinations there are for the system and so the more difficult the programming becomes.
6. XML documents should be human-legible and reasonably clear.
Rather than having elements that are named a3209zd you would have an element named <first_name>. Someone reading your XML should be able to make an educated guess about what the data is that's being tagged.
7. The XML design should be prepared quickly.
It is better to spend time building the data than it is on building an XML design.
8. The design of XML shall be formal and concise.
Only include as many elements as you need to be clear, not more and not less.
9. XML documents shall be easy to create.
XML is intended to not require a special editor or tool to create. And in fact, most XML documents can be edited in a text editor like Notepad or TextEdit.
10. Terseness in XML markup is of minimal importance.
When you're creating XML element names, first_name is better than fname because it's clearer and more human readable. While you do want to keep elements names short, the shortness should not be at the sacrifice of human-readability.


Advantages of XML

·     XML uses human, not computer, language. XML is readable and understandable, even by novices, and no more difficult to code than HTML.
·     XML is completely compatible with JavaTM and 100% portable. Any application that can process XML can use your information, regardless of platform.
·     XML is extendable. Create your own tags, or use tags created by others, that use the natural language of your domain, that have the attributes you need, and that makes sense to you and your users.

Disadvantages of XML

·         More difficult, demanding, and precise than HTML

·         Lack of browser support/end user applications

·         Still experimental/not solidified

Advantages of XML over HTML

·         By defining own markup language, can code documents more precisely

·         Reflects structure and semantics of documents --> better searching and navigation

·         Tagging/content separate from display

·         Allows single document to be used many ways

XML Structure

This page provides a description of XML structure including the document parts, the prologue, and provides a simple XML example document.

Document Parts

  • Prolog
  • Document Element (root element)

The Prologue

The prologue, equivalent to the header in HTML, may include the following:
  • An XML declaration (optional) such as:
<?xml version="1.0"?>
  • A DTD or reference to one (optional). An example reference to an external DTD file:
<!DOCTYPE LANGLIST SYSTEM "langlist.dtd">
  • Processing instructions - An example processing instruction that causes style to be determined by a style sheet:
<?xml-stylesheet type="text/css" href="xmlstyle.css"?>

An XML Document

Therefore a complete well formed XML document may look like:
<?xml version="1.0"?>
<LAND>
   <FOREST>
      <TREE>Oak</TREE>
      <TREE>Pine</TREE>
      <TREE>Maple</TREE>
   </FOREST>
   <MEADOW>
      <GRASS>Bluegrass</GRASS>
      <GRASS>Fescue</GRASS>
      <GRASS>Rye</GRASS>
   </MEADOW>
</LAND>
The below document is not an XML document since it does not qualify by the rules of a well formed document. There is more than one top level element which disqualifies the document from being well formed.
<?xml version="1.0"?>
<FOREST>
   <TREE>Oak</TREE>
   <TREE>Pine</TREE>
   <TREE>Maple</TREE>
</FOREST>
<MEADOW>
   <GRASS>Bluegrass</GRASS>
   <GRASS>Fescue</GRASS>
   <GRASS>Rye</GRASS>
</MEADOW>

NOKIA Facts

Here are some facts of our beloved phone company "NOKIA"

1) The ringtone "Nokia tune" is actually based on a 19th century guitar work named "Gran Vals" by Spanish musician Francisco Tárrega. The Nokia Tune was originally named "Grande Valse" on Nokia phones but was changed to "Nokia Tune" around 1998 when it became so well known that people referred to it as the "Nokia Tune."

2) The world's first commercial GSM call was made in 1991 in Helsinki over a Nokia-supplied network, by Prime Minister of Finland Harri Holkeri, using a Nokia phone.

3) Nokia is currently the world's largest digital camera manufacturer, as the sales of its camera-equipped mobile phones have exceeded those of any conventional camera manufacturer.

4) The "Special" tone available to users of Nokia phones when receiving SMS (text messages) is actually Morse code for "SMS". Similarly, the "Ascending" SMS tone is Morse code for "Connecting People," Nokia's slogan. The "Standard" SMS tone is Morse code for "M" (Message).

5) The Nokia corporate font (typeface) is the AgfaMonotype Nokia Sans font, originally designed by Eric Spiekermann. Its mobile phone User's Guides Nokia mostly used the Agfa Rotis Sans font.

6) In Asia, the digit 4 never appears in any Nokia handset model number, because 4 is considered unlucky in many parts of Southeast/East Asia.

7) Nokia was listed as the 20th most admirable company worldwide in Fortune's list of 2006 (1st in network communications, 4th non-US company).

8. Unlike other modern day handsets, Nokia phones do not automatically start the call timer when the call is connected, but start it when the call is initiated. (Except for Series 60 based handsets like the Nokia 6600)

9) Nokia is sometimes called aikon (Nokia backwards) by non-Nokia mobile phone users and by mobile software developers, because "aikon" is used in various SDK software packages, including Nokia's own Symbian S60 SDK.

10) The name of the town of Nokia originated from the river which flowed through the town. The river itself, Nokianvirta, was named after the old Finnish word originally meaning sable, later pine marten. A species of this small, black-furred predatory animal was once found in the region, but it is now extinct.

Google Tricks



1. Enter "Google Gravity" in the search bar. Hit "I'm feeling lucky" (if you have Google Instant enabled, it's on the right hand side of the suggested searches). Then watch your world fall down.

2. Simply search for the word "askew." We dare you not to tilt your head.


3. The Google doodle that launched a thousand lost hours of productivity will live forever at google.com/pacman.

4. Set your iGoogle homepage to the beach theme. Wait until 3:14am (or if you can't, just move your clock forward). What monster this way comes? Could we be on the shores of Loch Ness?


5. This one began life as an easter egg, and became so well-loved that Google incorporated it as a feature in Google Earth. Click on Tools > Enter Flight Simulator, and you're off and flying around the planet. Bon voyage!

6. Type 'google l33t' in search box and click I'm feeling lucky

7. Type 'google loco' in search box and click I'm feeling lucky. Then try to do some searches too.

8. Type 'google gothic' in search box and click I'm feeling lucky. Then try to do some searches too

9.Type ' ewmew fudd' in search box and click I'm feeling lucky.

10. Type ' xx-klingon' in search box and click I'm feeling lucky.

11.Type ' xx-piglatin' in search box and click I'm feeling lucky.

12 Simply go to Google.com and type the words “Do a barrel roll” and click enter. Allow your computer to do the rest for you and just see what happens.

Thursday, March 8, 2007

Developing Drivers from Windows

Download Free ScreenSavers and Wallpapers! - http://offr.biz/HLSCR300468KXRFJFT




Definition Device Driver

A device driver, often called a driver for short, is a computer program that enables another program, typically, an operating system (e.g., Windows, Linux) to interact with a hardware device. A driver is essentially an instruction manual that provides the operating system with the information on how to control and communicate with a particular piece of hardware.





Windows 2000 Driver Design Goals

  • Portability
    • The driver program should be compatible across all platforms. So it is must not be written in assembly language coding since instruction sets changes from processor to processors. Coding in C would be good idea since it can be recompiled and run on any platform. But care should be taken as to, no library function are used. Since those library function may not be available on another platform.
  • Configurability
  • Always pre-emptive and interruptive
    • Pre-emptive scheduling means if a higher priority process arrives then the processor sends the process, which is in execution to the wait state and executes the higher priority process. This type of scheduling is an effective way to maximize average performance.
    • Two schemes are used here
      • The Kernel-defined run-time priority scheme for threads
      • The Kernel-defined interrupt request level (IRQL)
        • Priority order of IRQL
          • Software Interrupts - low priority
          • Decvice drivers - higher priority
          • System-critical such as system clock or bus-error interrupts - highest priority.
  • Multiprocessor-safe on multiprocessor platforms
    • In a multiprocessor environment a process will check each processor to execute its process. Care should be taken as to, that the process should not be executed in two processors.
  • Object-based
    • If we design our driver program as separate routines or objects then modifying the driver can be very useful in future implementations.
  • Packet-driven I/O with reusable I/O request packets
    • I/O requests can be small or big. Sending then as such would result in tremendous overhead. So as such we group them into packets or split large packets and send them across to various destinations.
  • Support for asynchronous I/O
    • Asynchronous means the process does not wait for the request to be completed. Instead it carries on with the next set of instruction.
    • This is very good time saving mechanism.

How to run a Device Driver in Windows


Creating the code

· First create a separate directory for your driver.

· Then create the driver code in .c files and store it in that directory.

· Then create the following two files

Makefile

!INCLUDE $(NTMAKEENV)\makefile.def

Build

TARGETNAME = test //the name of the .sys file we desire

TARGETPATH = obj

TARGETTYPE = DRIVER

INCLUDES = %BUILD%\inc

LIBS = %BUILD%\lib

SOURCES = test.c // the name of the file that contains the driver code

  • Both these files should be stored in the same directory as of the .c file.
  • Both should be saves without any extensions.

Compiling Your Driver Code

· Then go to the DDK in the start menu and select

_>Development Kit

__>Windows 2000 DDK

___>Check Build Environment

· A command prompt opens.

· Navigate to the directory where your driver code resides.

· Then Type build in the command prompt.

· It compiles your driver code.

· Once the compilation is over the .sys file is created.

Registering your Driver

· Before executing the .sys file it has to be registered with the windows registry.

· To register a .sys file download the OSR Driver Loader from the net and first install it.

· Then open and it and in the Driver Path give your newly created .sys file.

· All device driver can be loaded only once but it can be started or stopped frequently.

· The software itself contains all the options such as registering a driver and unregistering a driver, start and stopping the service.

· You can also start and stop the service from command prompt itself using the commands

· netstart (driver name without extension) and netstop(driver name without extension).

Viewing the Output

· To view the output, use the DebugView for debugging and viewing output. Once again it should be downloaded from net.

· Run this first before starting the service and hence you can view the output.