February 2007


I have recently experienced some DNS problems and so decided to look into configuring an alternative or Secondary DNS for my domain. A secondary DNS server will copy the DNS settings from your primary DNS server on a regular basis, so there is no need to maintain two sets of data. If you use separate records, then browsers will have problems deciding which is up to date. There are several free services out there including Twisted for Life and Zone Edit. Other fee paying services you might consider are SecondaryDNS or EasyDNS.

Once you have signed up with your secondary DNS provider, you will need to submit a support ticket to your hosting provider (unless you have true root access) in order to modify your current DNS server’s configuration. Let's assume that your new nameserver is called ns1.alternativeDNS.com. On Westhost you will need to ask them to edit your BIND file (/var/named/db.yourdomain.com) and add a line similar to yourdomain.com. IN NS ns1.alternativeDNS.com. The trailing dot is important!. Your hosting provider may also have to add ns1.alternativeDNS.com to their nameserver to permit AXFR transfers of the information . If this does not work, try editiing /etc/named.conf.

Once this has been done, your secondary DNS provider will be able to mirror the details from your current provider. You can check that your secondary DNS provider has the correct information by retrieving the information from their nameserver. You need to type nslookup www.yourdomain.com ns1.alternativeDNS.com in Windows, or dig @ns1.alternativeDNS.com www.yourdomain.com in Linux.

The final step is to modify the nameserver entries with your registrar. Log in to your account with them and add this new nameserver to your existing list. This will take a while to propogate around the internet, so come back later and check that all your nameservers are listed when you use the command nslookup -type=NS yourdomain.com in Windows or dig -t NS yourdomain.com in Linux.

Check that everything is correct by going to DNSReport.com

Bookmark this article

If you want to run certain applications, you may need to create a different environment. To create custom startup files for an MS-DOS-based program that may require a special configuration

  1. Using a text editor, such as Notepad, edit the Config.nt and Autoexec.nt files (located in systemroot\System32).
  2. Save each file with a new name.
  3. Right-click the MS-DOS-based program shortcut , and then click Properties.
  4. Click the Program tab, and then click Advanced.
  5. Under Custom MS-DOS initialization files, type the new names for your custom startup files.

Notes

  1. This procedure might be required because some MS-DOS programs use special memory and video instructions, or require that other programs be installed prior to their being started. Please refer to the documentation that came with the program before creating startup files.
  2. Use the documentation that came with the MS-DOS-based program to create a shortcut. For more information, click Related Topics.
  3. This option might not be available on some MS-DOS-based programs.
  4. To use custom startup files when starting an MS-DOS-based program, you must start the program from its shortcut.
  5. Creating a program information file (PIF) for an MS-DOS-based program creates a shortcut to the program executable. All the settings saved in the PIF file are contained in the shortcut.
Bookmark this article

Certain letters are more common in written English than others, for example I is used far more often than W. By analyzing a large piece of known text we can find which letters are used most often. These sequences will vary depending on the text analyzed, but typical sequences are :

E,T,O,A,N,I,R,S,H,D,L,C,F,U,M,P,Y,W,G,B,V,K,X,J,Q,Z or alternately E,T,A,O,I,N,S,H,R,D,L,C,U,M,W,F,G,Y,P,B,V,K,J,X,Q,Z

Just as letters have expected frequencies in language, so do groups of letters; tables of frequencies of digraphs (pairs of letters) and trigraphs (sets of three letters) exist to assist the cryptoanalyst. The thirty most common digraphs in the English language are, in order of occurrence:

th, er, on, an, re, he, in, ed, nd, ha, at, en, es, of, or, nt, ea, ti, to, it, st, io, le, is, ou, ar, as, de, rt, ve.

The fifteen most common trigraphs are:

the, and, tha, ent, ion, tio, for, nde, has, nce, edt, tis, oft, sth, men

Other statistics:

Order Of Frequency Of Most Common Doubles ss ee tt ff ll mm oo

Order Of Frequency Of Initial Letters T O A W B C D S F M R H I Y E G L N P U J K

Order Of Frequency Of Final Letters E S T D N R Y F L O G H A K M P U W

One-Letter Words a, I.

Most Frequent Two-Letter Words of, to, in, it, is, be, as, at, so, we, he, by, or, on, do, if, me, my, up, an, go, no, us, am

Most Frequent Three-Letter Words the, and, for, are, but, not, you, all, any, can, had, her, was, one, our, out, day, get, has, him, his, how, man, new, now, old, see, two, way, who, boy, did, its, let, put, say, she, too, use

Most Frequent Four-Letter Words that, with, have, this, will, your, from, they, know, want, been, good, much, some, time

Bookmark this article

Even though you have spent hours finely tuning your CSS style sheet, the webpage will not display correctly. You have even gone as far as defining a unique style the piece of text you are trying to format. What is the problem? It probably lies with the cascading order.

The primary sort of the declarations is by weight and origin

  • !important declarations override normal declarations.
  • For !important declarations, User style sheets override Author style sheets which override the Default style sheet.
  • For normal declarations, Author style sheets override User style sheets which override the Default style sheet.

Note. This is a semantic change since CSS1. In CSS1, author "!important" rules took precedence over user "!important" rules.

The secondary sort is by specificity of selector. A selector's specificity is calculated by concatenating the three numbers a-b-c:

  • count the number of ID attributes in the selector (= a)
  • count the number of other attributes and pseudo-classes in the selector (= b)
  • count the number of element names in the selector (= c)
  • ignore pseudo-elements.

(Use the same number of digits for each parameter, eg 031023 if you have more than nine of a, b or c)

Some examples:

*             {}  /* a=0 b=0 c=0 -> specificity =   0 */
LI            {}  /* a=0 b=0 c=1 -> specificity =   1 */
UL LI         {}  /* a=0 b=0 c=2 -> specificity =   2 */
UL OL+LI      {}  /* a=0 b=0 c=3 -> specificity =   3 */
H1 + *[REL=up]{}  /* a=0 b=1 c=1 -> specificity =  11 */
UL OL LI.red  {}  /* a=0 b=1 c=3 -> specificity =  13 */ 
LI.red.level  {}  /* a=0 b=2 c=1 -> specificity =  21 */
#x34y         {}  /* a=1 b=0 c=0 -> specificity = 100 */ 

Inline style declarations (Example: <li style="color:red;">) are considered to have an ID selector (specifity of a=1, b=0, c=0) and to have been defined last, so will take priority.

If you want to override a certain property, you can force it by specifying !important to the definition. For example

CODE:
  1. li.geshi {
  2.         background-image:none !important;
  3.         border:none;
  4.         padding: 0px;
  5. )
  6. #content ul li {
  7.     background: url(img/bullet.gif) no-repeat 0 7px;
  8. }

will force background-image to be none for any <li class="geshi"> elements even if they are within an element with an ID of #content. The #content ID style would otherwise take precedence.

Bookmark this article

At first glance Cascading Style Sheets (CSS) are the panacea for our formatting woes. If I want a paragraph to be highlighted in yellow, then I would just have to define a class, apply this to the element and away we go.

But there is the knub. It appears that while properties are inherited, classes are not. Thus a paragraph element <p> will inherit the properties from its generic block container <div> but not the class.

For example, the code

HTML:
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2.  
  3.   <style type="text/css">
  4.     #first { color: blue; }
  5.    .two { color: red; text-indent: 4em; }
  6.    p.three{ color:green; }
  7.   </style>
  8.  </head>
  9.  
  10.   <div id="first">
  11.    <p>This paragraph will inherit its properties from ID first and therefore be in blue</p>
  12.   </div>
  13.   <div class="two">
  14.    <p>This paragraph will be formatted using class two and be in red, indented 4 em because the style is inherited from the div element to which the style has been applied</p>
  15.   </div>
  16.   <div class="three">
  17.    <p>This paragraph will not be formatted using style three because the style definition only applies to the paragraph element with a class of three and classes are not inherited</p>
  18.    <p class="three">so the style is not applied unless the class is explicitly stated</p>
  19.   </div>
  20.  </body>
  21.  
  22. </html>

produces the following output

This paragraph will inherit its properties from ID first and therefore be in blue

This paragraph will be formatted using class two and be in red, indented 4 em because the style is inherited from the div element to which the style has been applied

This paragraph will not be formatted using style three because the style definition only applies to the paragraph element with a class of three and classes are not inherited

so the style is not applied unless the class is explicitly stated

Bookmark this article