MY mENU


Thursday 27 December 2012

SQL SERVER – What is – DML, DDL, DCL and TCL – Introduction and Examples


SQL SERVER – What is – DML, DDL, DCL and TCL – Introduction and Examples

DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database.
Examples: SELECT, UPDATE, INSERT statements
DDL
DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database.
Examples: CREATE, ALTER, DROP statements
DCL
DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it.
Examples: GRANT, REVOKE statements
TCL
TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database.
Examples: COMMIT, ROLLBACK statements

Friday 21 December 2012

JSON Introduction

What is JSON?
  •  JSON stands for JavaScript Object Notation.
  •  JSON is lightweight text-data interchange format.
  •  JSON is language independent.
  •  JSON is "self-describing" and easy to understand.
JSON uses JavaScript syntax for describing data objects, but JSON is still language and platform independent. JSON parsers and JSON libraries exists for many different programming languages.

JSON format is a format similar to XML but usually it is shorter and easier to parse. Many web services now work with JSON. Using the new JSON library, you can parse and generate JSON strings easily.

Much like XML
  • JSON is plain text
  • JSON is "self-describing" (human readable)
  • JSON is hierarchical (values within values)
  • JSON can be parsed by JavaScript
  • JSON data can be transported using AJAX
Much Unlike XML
  • No end tag
  • Shorter
  • Quicker to read and write
  • Can be parsed using built-in JavaScript eval()
  • Uses arrays
  • No reserved words
Why JSON?
For AJAX applications, JSON is faster and easier than XML:
Using XML
  • Fetch an XML document
  • Use the XML DOM to loop through the document
  • Extract values and store in variables
Using JSON
  • Fetch a JSON string
  • eval() the JSON string

GSM, 3G, Edge, WIFI, GPS

GSM: (Global System for Mobile Communications: originally from Groupe Spécial Mobile) is the most popular standard for mobile.


3G stands: for 3rd-generation mobile technology. The services associated with 3G provide the ability to transfer both voice data and non-voice data. 3G brings wireless transmission speeds, which allow full motion video, high-speed internet access and video-conferencing. 


Edge means: Enhanced Data rates for GSM Evolution (EDGE) is a digital mobile phone technology which acts as a bolt-on enhancement to 2G and 2.5G GPRS networks. It can carry data speeds up to 384 kbit/s in packet mode and will therefore meet the International Telecommunications Union's requirement for a 3G network.

WIFI:  wireless local area network: a local area network that uses high frequency radio signals to transmit and receive data over distances of a few hundred feet; uses ethernet protocol)

GPS: (a navigational system involving satellites and computers that can determine the latitude and longitude of a receiver on Earth by computing the time difference for signals from different satellites to reach the receiver)



Wednesday 19 December 2012

Should variables be stored in local blocks?

The use of local blocks for storing variables is unusual and therefore should be avoided, with only rare exceptions. One of these exceptions would be for debugging purposes, when you might want to declare a local instance of a global variable to test within your function. You also might want to use a local block when you want to make your program more readable in the current context.

Sometimes having the variable declared closer to where it is used makes your program more readable. However, well-written programs usually do not have to resort to declaring variables in this manner, and you should avoid using local blocks.

HTML5 Introduction

HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring and presenting content on the World Wide Web.

HTML5 is a cooperation between the World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG).

The new standard incorporates features like video playback and drag-and-drop that have been previously dependent on third-party browser plug-ins such as Adobe Flash, Microsoft Silverlight, and Google Gears.
Browser Support:

The latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many HTML5 features and Internet Explorer 9.0 will also have support for some HTML5 functionality.

The mobile web browsers that come pre-installed on iPhones, iPads, and Android phones all have excellent support for HTML5.
New Features: HTML5 introduces a number of new elements and attributes that helps in building a modern websites. Following are great features introduced in HTML5.
  • New Semantic Elements: These are like <"header">, <"footer">, and <"section">
  • Forms 2.0: Improvements to HTML web forms where new attributes have been introduced for <"input"> tag.
  • Persistent Local Storage: To achieve without resorting to third-party plugins.
  • WebSocket : A a next-generation bidirectional communication technology for web applications.
  • Server-Sent Events: HTML5 introduces events which flow from web server to the web browsers and they are called Server-Sent Events (SSE).
  • Canvas: This supports a two-dimensional drawing surface that you can program with JavaScript.
  • Audio & Video: You can embed audio or video on your web pages without resorting to third-party plugins.
  • Geolocation: Now visitors can choose to share their physical location with your web application.
  • Microdata: This lets you create your own vocabularies beyond HTML5 and extend your web pages with custom semantics.
  • Drag and drop: Drag and drop the items from one location to another location on a the same webpage.
  • Backward Compatibility
HTML5 is designed, as much as possible, to be backward compatible with existing web browsers. New features build on existing features and allow you to provide fallback content for older browsers.

It is suggested to detect support for individual HTML5 features using a few lines of JavaScript.

Monday 17 December 2012

What is jQuery?


jQuery is a lightweight, "write less, do more", JavaScript library.The purpose of jQuery is to make it much easier to use JavaScript on your website. jQuery takes a lot of common tasks that requires many lines of JavaScript code to accomplish, and wraps it into methods that you can call with a single line of code. jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation. The jQuery library contains the following features:

  • HTML/DOM manipulation
  • CSS manipulation
  • HTML event methods
  • Effects and animations
  • AJAX
  • Utilities

Friday 7 December 2012

POPUP Boxes in JavaScript

A popup box that displays a message, along with an "OK" button. Depending on the popup box, it might also have a "Cancel" button, and you might also be prompted to enter some text. These are all built into JavaScript and are what I call "JavaScript popup boxes". They can also referred to as "dialog boxes", "JavaScript dialog" , "popup dialog" etc.

ALERT BOX:

  • The syntax for an alert box is: alert("yourtext");
  • The user will need to click "OK" to proceed. 
  • Typical use is when you want to make sure information comes through to the user.
  • Examples could be warnings of any kind.(Typical examples are "Adult Content", or technical matters like "This site requires Shockwave Flash plug-in").


Screenshot of a JavaScript alert box


CONFIRM BOX:
  • The syntax for a confirm box is: confirm("yourtext");
  • The user needs to click either "OK" or "Cancel" to proceed.
  • Typical use is when you want the user to verify or accept something.
  • Examples could be age verification like "Confirm that you are at least 57 years old" or technical matters like "Do you have a plug-in for Shockwave Flash?"

- If the user clicks "OK", the box returns the value true.
- If the user clicks "Cancel", the box returns the value false.

Screenshot of a JavaScript confirm box




PROMPT BOX:

  • The prompt box syntax is: prompt("yourtext","defaultvalue");
  • The user must click either "OK" or "Cancel" to proceed after entering the text.
  • Typical use is when the user should input a value before entering the page.
  • Examples could be entering user's name to be stored in a cookie or entering a password or code of some kind.

- If the user clicks "OK" the prompt box returns the entry.
- If the user clicks "Cancel" the prompt box returns null.
Screenshot of a JavaScript prompt box

Since you usually want to use the input from the prompt box for some purpose it is normal to store the input in a variable, as shown in this example:

Syntax Of JavaScript


Explanation of code
  • The tag Script tell the browser to expect a script in between them. You specify the language using the type attribute. The most popular scripting language on the web is JavaScript.
  • The bits that look like HTML comments tags are just that - HTML comment tags. These are optional but recommended. They tell browsers that don't support JavaScript (or with JavaScript disabled) to ignore the code in between. This prevents the code from being written out to your website users.
  • The part that writes the actual text is only 1 line (document.write("JavaScript is not Java");). This is how you write text to a web page in JavaScript. This is an example of using a JavaScript function (also known as method).

Where to put your scripts?

You can place your scripts in any of the following locations: Between the HTML document's head tags. Within the HTML document's body (i.e. between the body tags). In an external file (and link to it from your HTML document).

The location choice of head or body is very simple. If you want to have a script run on some event, such as when a user clicks somewhere, then you will place that script in the head. If you want the script to run when the page loads, like our "Hello World!" example in the previous lesson, then you will want to place the script within the body tag.

Java Script Introduction

What is JavaScript?

JavaScript is a scripting language that enables web developers/designers to build more functional and interactive websites.

Common uses of JavaScript include:
  1. Alert messages
  2. Popup windows
  3. Dynamic dropdown menus
  4. Form validation
  5. Displaying date/time
JavaScript usually runs on the client-side (the browser's side), as opposed to server-side (on the web server). One benefit of doing this is performance. On the client side, JavaScript is loaded into the browser and can run as soon as it is called. Without running on the client side, the page would need to refresh each time you needed a script to run.
What do I need to create JavaScript?
You can create JavaScript using the same equipment you use when creating HTML. That is:
Computer, Text editor. For example, Notepad (for Windows), Pico (for Linux), or Simpletext (Mac). You could use a HTML editor if you like but it's not needed.
Web Browser. For example, Internet Explorer or Firefox. You will need to ensure JavaScript is enabled within your browser's settings (this is normally enabled by default).