Skip to main content

Posts

:nth-child structural pseudo-class selectors

There are 4 pseudo-class expressions that are part of the :nth-child pseudo-class. Structural pseudo-class selectors target HTML elements based on the DOM tree. Basically, elements that cannot easily be targeted by simple selectors or combinations of selectors. What makes pseudo-classes so handy is the ability style elements dynamically based on its position in the DOM. :nth-of-type(N) :nth-last-child(N) :nth-child(N) :nth-last-of-type(N) :nth-of-type(N) selector My favorite of the 4 is the :nth-of-type(N) selector. The nth-of-type selector allows you to select child elements of a parent based on the particular type of the element, for example every 5th "li" element in a list. You can select even or odd elements, or the nth (order number) child in the group of elements. The class accepts the argument "n" which can can be a keyword, a number, or strings "odd", "even", or an expression "-n+3". Let's look at a simple but ef...

Creating triggers

Triggers are SQL statements which are stored with the intention of being activated or fired when an event associated with a database table occurs. This could be any event including an INSERT, UPDATE and DELETE. Lets begin by creating a few simple insert triggers CREATE a trigger on the ORDERLINE table for the insert event. The trigger will update the corresponding PRODUCT record QTY_ORDERED by adding the value of QTY to QTY_ORDERED. CREATE TRIGGER tr_qty_ordered_value_insert ON Orderline FOR INSERT AS BEGIN UPDATE product SET QTY_ORDERED = QTY_ORDERED + ((SELECT qty from INSERTED) * (SELECT unitprice from INSERTED)) WHERE product.ProductID = (SELECT ProductID from INSERTED); END; Command(s) completed successfully. CREATE a trigger on the ORDERLINE table for the delete event. The trigger will update the corresponding PRODUCT record QTY_ORDERED by subtracting the value of QTY FROM QTY_ORDERED. CREATE TRIGGER tr_qty_ordered_value_delete ON Orde...

The ICMP protocol

Let's look into the ICMP protocol. Specifically, ping and traceroute. ICMP is the Internet Control Message Protocol and is a component of the IP Layer. Basically, used by hosts to communicate diagnostic network layer information that is carried in the IP payload. It communicates error messages which are acted on by the IP layer or the UDP or TCP protocols. All of the exercises were carried out using the open source network protocol analyzer "Wireshark". www.wireshark.org Describe in detail the protocols ARP and ICMP. ARP is the Address Resolution Protocol is similar to that of DNS. Where DNS resolves IP addresses to domain names, ARP resolves network layer IP addresses to link layer MAC addresses. In order to send a datagram the source must give the adaptor the IP address and the MAC address. For example, host A wants to send a packet to host B. Host A uses a cached ARP table to look up the IP address for any existing records of host B's MAC address. If the MA...

Router modes and channel impairments

What does it mean for a wireless network to be operating in "infrastructure mode?" Clients connected to a base station (an access point or router) are operating in infrastructure mode. They communicate indirectly through this access point or router which serves as a bridge to a wired network. Ad-hoc mode networks are networks that do not rely on a router or access point infrastructure. As a result, each client participates in the routing by forwarding data to the other connected clients. What are the differences between the following types of wireless channel impairments:  path loss, multipath propagation, interference from other sources? Multipath propagation is when packet loss occurs due to electromagnetic waves reflecting off of ground objects which then take paths of different lengths between sender and receiver. Interference from other sources happens when there is interference from radio sources transmitting in the same frequency band. Wireless phones and wirel...

Broadband Connectivity in Rural America

In what is called the "Digital Divide" broadband connectivity in rural America is sporadic, prohibitively expensive, and nonexistent. Those of us living in or around metropolitan areas have a choice of provider services ranging from cable modem, telephone line DSL (digital subscriber line), fiber optic cable, WiMax, fixed wireless, satellite, and broadband over existing power lines (BPL). A study done by the Pew Internet and American Life Project indicated that while broadband adoption is growing in urban, suburban, and rural areas, broadband users make up larger percentages of urban and suburban users than rural users. Pew found that the percentage of all U.S. adults with in home broadband is 52% for urban areas, 49% for suburban areas, and 31% for rural areas. (Kruge, 2008)   For service providers deploying equipment is costly making the return on investment low due to the population density.   As pointed out in the same study, the greater the geographical distances amon...

Multitasking in the workplace

Multitasking in the workplace degrades the quality of work. Laser like intensity and single mindedness of purpose promotes quality. I am terrible at multitasking. I admit it, but only to myself. Is multitasking is a badge of honor? I doubt my co workers believe they are good at multitasking as well. Perhaps it's co worker peer pressure. During my typical workday as a UI web developer I have 3 Photoshop files open, my phone concerning head set on and dialed into a meeting. I'm composing a design document in MS Word for another project. I'm coding another project in my editor. I'm checking code into the repository before the cut off which is fast approaching, and 3 people are asking me questions on IM. Maybe its peer pressure in the work place exacerbated by the current economic environment. I dare not show I'm incapable of multitasking! As pointed out (Hillstrom, 2002) "Technology is also creating the ability to leverage the efforts of employees more and more. ...

Website analysis of www.morningstar.com

Whether you are a do it yourselfer or a veteran financial planner, Morningstar's robust investment information makes it one of the most authoritative financial resources on the internet. A typical user may view a mutual fund's expense ratio, moving average, or current NAV value to help decide on a fund purchase. Another user may simply check on the “star rating” Morningstar provides for each fund. Information gathering can be at a high level or can be very granular depending on the user, how much they drill down into the information, and statistical data provided. There is a need for financial information that can be accessed in real time. For the day trader this information must be reliable and available constantly. It has been suggested that the market's volatility may be due in part to the ability to automate trading and stop loss orders through the web. I feel Morningstar is a major information resource for financial investing. Applying the usability guidelines offered...