Monday, September 23, 2013
DHTML Basics
XML Basics
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.
Advantages of XML
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:
- A DTD or reference to one (optional). An example reference to an external DTD file:
- Processing instructions - An example processing instruction that causes style to be determined by a style sheet:
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
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.