avatar

Andres Jaimes

CSS – Attribute selectors

Attribute selectors allow you to select CSS elements based on their attributes or values.

For example, if you want to select an image named “great.gif” you can do it by using the following rule:

1img[src="great.gif"] { border: 3px solid #000; …

Create a DNS zone file

by FreeBSD.org

An example master zone file for example.org (existing within /etc/namedb/master/example.org) is as follows:

$TTL 3600        ; 1 hour default TTL
example.org.    IN      SOA      ns1.example.org. admin.example.org. ( …

How to create a simple gradient in C#

Creating a simple gradient using two colors is very simple:

1Rectangle rect = new Rectangle(0, 0, 100, 100);
2LinearGradientBrush lgb = new LinearGradientBrush(rect, Color.White, Color.Blue, 90);
3e.Graphics.FillRectangle(lgb, rect);

This code will …

Printing in C# – The easy way

Believe me, it is easy. As with any class, before we can use any of the Classes, Events and Objects available to us in the .Net Framework we need to import the Namespaces we need. For this we need 3 namespaces. VB.Net users only required 2 because …

How to choose a printer using C#

You can assign a printer and other settings by using the basic PrintDocument and PrintDialog controls properties. Look at the next example:

1if (printDialog.ShowDialog() == DialogResult.OK) {
2    printDocument.PrinterSettings.PrinterName = …