HTML5 Form Input Types and Attributes

  • HTML5 has introduced 13 new input types and several new attributes for <form> and <input> tags.
  • You can determine your browser supporting various features of HTML5 using http://html5test.com/
  • Not all browsers fully support HTML5 new input types and attribute.

<form id="myform">
    Name: <input name="name" required placeholder="Your name" pattern="[A-z]{10}" />
    <br/>
    Email: <input type="email" name="email" required placeholder="test@domain.com"/>
    <br/>
    URL: <input type="url" name="url" placeholder="Homepage URL"/>
    <br/>
    Age: <input type="number" name="age" min="18" max="99" />
    <br/>
    Description: <textarea name="desc" placeholder="Description text here"></textarea>
    <br/>
    <input type="submit" value="Submit" />
</form>

HTML5 Declaration

Old:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

New:

<!DOCTYPE html>

With this the browser knows what type of document to expect.

HTML5 Tags

  • HTML5 contains a rich set of proposed tags.
  • The goal of these new tags is to bring richer semantic meaning to content.
  • Some tags from previous HTML version have been deprecated such as <acronym>, <big>, <dd>, <frame>, <strike>, etc.
  • Some of the new tags are <source>, <footer>, <video>, <canvas>, <audio> and further more.

HTML5 Features

  • Video playback and drag-and-drop.
  • Through a standardized interface, it provides new multimedia functionality of <audio> and <video>.
  • Reduced usage of plugins like Flash.
  • Offline storage,

html5 features

  • The canvas element for immediate mode 2D drawing,
  • Document editing,
  • Browser history management,
  • Drag-and-drop,
  • Compressed and user-friendly API.
  • Addition of formats like date, time, calendar, email, url
  • Other features such as ContentEditable, Stylable elements, Canvas element for drawing, geo-location, Web Forms 2.0, server-sent DOM Events, hyper-threading for Web browsers, application caches, client-side storage and further more.

What is HTML5?

  • HTML5 is a newest version of HTML (Hypertext Markup Language).
  • By World Wide Web Consortium (W3C) and the Web Hypertext Application Technology Working Group (WHATWG)

  • Some rules for HTML5 were established:

    • New features should be based on HTML, CSS, DOM, and JavaScript
    • Reduce the need for external plugins (like Flash)
    • Better error handling
    • More markup to replace scripting
    • HTML5 should be device independent
    • The development process should be visible to the public

Windows Azure Error failed to start storage emulator the sql server instance localhost sqlexpress could not be found

Resolving: Windows Azure Error failed to start storage emulator the sql server instance localhost sqlexpress could not be found

You need to run DSInit utility to create database. For Windows Azure SDK 1.6 the location for DSInit utility is:

C:Program FilesWindows Azure Emulatoremulatordevstore

By default DSInit expects that your database server is (local)SQLEXPRESS but you can change it easily. If you have MSSQL instance called SQLEXPRESS then it is enough to just run DSInit. If you need some other instance then run the following command:

DSInit /sqlinstance:<instance name>

For default instance use “.” as instance name:

DSInit /sqlinstance:.

You can find more information about sqlinstance and other switches from DSInit documentation. If database was correctly created you should see dialog like this:

DSInit: Strorage databases are done

When storage database is ready you can run your application.

Set or Modify Default Search Engine from Address Bar in Mozilla Firefox

Modify Default Search Engine

The eToolKit hacked my Mozilla web browser by setting its search engine on my address bar. It was so annoying so I found a solution to Modify Default Search Engine:

1. Open Mozilla Web Browser

2. In the address bar, type about:Config and press enter

3. You will get a security warning "This might void your warranty!", just ignore it and click "I’ll be careful, I promise!".

4. In filter box, type keyword.URL

5. Select the row that appears and right click on it and click Reset. You can also set it to something else by right clicking and clicking Modify. You can then set it to a search URL as required. However, check the details for the search engine URL to be used with their respective website.

 

Website Marketing

Market your website and share the link with the world. Website marketing is very important if you are focusing on increasing your business or reach to the people.

Website Marketing

You may be having a very good and useful website but if the website is not visible to its users, then you are not really having its worth.

Whenever you create a website or to be specific a page or section within website you are targeting a user group for whom you are creating this website. The targeted group can be any set of users like CEOs of the manufacturing companies, CEOs of the software companies, students from a specific stream (science, commerce, arts, etc), housewives, etc.

Now if your website was created with a specific user set for example housewives and if through a wrong medium it is seen by the students of science background, you have not reached your potential users. The students will just ignore the website or page which is not relevant to them (in this case).

On the other hand, if the website is visited by your targeted users for example housewives. They would want to explore it more and more. If they find it interesting they would also share it with their friends, relatives, etc with the help of social media like Facebook, Google+, etc. Hence, your targeted users are multiplied.

The more visible your website is, the more the chances of it being seen by your targeted users and in case you have a business or an ad on the website or the page, the more you make money through this better visibility.

So having your website advertised at many places is a good idea.

Advertising it at the sites that are more popular will get your site or pages even better visibility. The sites that have categorized listings are more helpful to reach the targeted users.

For example, if a website is listing everything at one place it will be confusing for a user and again the case of a housewife targeted page being shown to a science student will occur. On the contrary, if the webpage or website is advertised where categories are present, it will help users to reach to the section they are interested in.

For example, a science student will never enter the section that is meant for a housewife and the chances of the site or page getting their targeted users increases!

Insert an element AT SPECIFIED position in an array of size S

Insert an element at SPECIFIED position in an array of size S.

Algorithm:

1.       START

2.        N = Get Total number of elements currently present in the array (A)  (Assuming that elements are present without any empty spaces so if an array is

A{   23, 24, 25, <no element>, 26, <no element>  }, N returned by this function is 6)

3.       If N==0, goto 5

4.       If (N<S),  goto 5, else goto 10

5.       position = Get Position where element has to be inserted.

6.       If(position>size -1), goto 10

7.       Ele = Get a new element to insert

8.       If (N>0) shift all elements from A[position] to one position right

9.       A[pos] = Ele

10.   STOP

 

Implementation:

Scenario 1: Some elements are present.

Array A[10]. N=5. S=10, position=3

ARRAY BEFORE INSERTION:

15

20

26

78

25

 

 

 

 

 

 

1.       START

2.       N=5

3.       N is not zero so goto next step (5).

4.       5<10, so going to next step

5.       Position = 3

6.       3>9, which is false, so going to next step

7.       Ele = 13

8.       Move all elements from A[3] to one position right. After this step, array looks like:

15

20

26

 

78

25

 

 

 

 

 

9.        A[3] = 13

10.   STOP

 

ARRAY AFTER INSERTION:

15

20

26

13

78

25

 

 

 

 

 

 

 

Scenario 2: Array is EMPTY.

Array A[10]. N=0. S=10, position=3

ARRAY BEFORE INSERTION:

 

 

 

 

 

 

 

 

 

 

 

1.       START

2.       N=0

3.       Since N=0, going to STEP 5

4.       <NOT EXECUTED>

5.       Position = 3

6.       3>9 is false, going to next step

7.       Ele = 13

8.       0>0 is not true, so going to next step, without shifting

9.       A[3]=13

10.   STOP

ARRAY AFTER INSERTION

 

 

 

13

 

 

 

 

 

 

 

 

 

 

 

Scenario 3: Array is FULL

Array A[10]. N=10. S=10, position=3

ARRAY BEFORE INSERTION:

15

20

26

78

25

19

87

92

34

16

 

1.       START

2.       N=10

3.       N is not zero so going to next step.

4.       10<10, which is false hence goto 10

5.       <NOT EXECUTED>

6.       <NOT EXECUTED>

7.       <NOT EXECUTED>

8.       <NOT EXECUTED>

9.       <NOT EXECUTED>

10.   STOP

 

ARRAY AFTER INSERTION (NO CHANGE):

15

20

26

78

25

19

87

92

34

16

Insert an element AT LAST available position in an array of size S

Insert an element at last available position in an array of size S.

Algorithm:

1.       START

2.       N = Get Total number of elements currently present in the array (A)

3.       Ele = Get a new element to insert

4.       If (N < S) then A[N] = Ele

5.       STOP

 

Implementation:

Scenario 1: Some elements are present.

Array A[10]. N=5. S=10

ARRAY BEFORE INSERTION:

15

20

26

78

25

 

 

 

 

 

 

1.       START

2.       N=5

3.       Ele = 13

4.       If(5<10), A[5] = 13

5.        STOP

 

ARRAY AFTER INSERTION:

15

20

26

78

25

13

 

 

 

 

 

Scenario 2: Array is empty.

Array A[10]. Size=10

ARRAY BEFORE INSERTION:

 

 

 

 

 

 

 

 

 

 

 

1.       START

2.       N=0

3.       Ele = 13

4.       If(0<10), A[0] = 13

5.        STOP

 

ARRAY AFTER INSERTION:

13

 

 

 

 

 

 

 

 

 

 

 

Scenario 3: Array is FULL.

Array A[10]. Size=10

ARRAY BEFORE INSERTION

15

20

26

78

25

27

36

97

12

69

 

1.       START

2.       N=10

3.       Ele = 13

4.       If(10<10) which is false hence no insertion

5.       STOP

 

ARRAY AFTER INSERTION

15

20

26

78

25

27

36

97

12

69