Web design: CSS margin and padding

The tutor shows examples of margin and padding, two important aspects of a webpage element’s style.

An element’s margin is the space around it. It can also be seen as the space between the element and other elements.

This paragraph has a margin 70% of the page. That’s why it runs on so many different lines.
margin-right:70%;

An element’s padding is the space between its content (text or image) and its own outer border.

This paragraph has 20% padding. Note the distance from this text to the outside of this box, in any direction.
padding:20%;


I’ll be showing more CSS concepts in coming posts:)

Source:

w3schools

w3schools

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Lifestyle: plant identification from field guide: Norway maple

The tutor shares another neighborhood find.

I’ve noticed, over the years, maple trees that have dark red, or purple, leaves. For some reason, I imagined I knew what kind they were, but had just forgotten. Today I noticed another one, and decided I’d rediscover the kind it is.

I think I must never have known that kind of maple. According to my sources, it’s likely the Norway maple, of which I’ve never heard. It’s not native to here, but is planted often in urban areas. In shape, its leaves resemble the sugar maple. Not all Norway maples have purple leaves; some have green. Those trees are likely easy to mistake for a sugar maple.

This is a great time of year for plant identification:)

Source:

forestry.usu.edu

Brockman, Frank C. and Rebecca Merrilees.
   Trees of North America: A Guide to Field Identification. New York: Golden Press,
   1968.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

jQuery: toggle()

The tutor begins with jQuery, talking specifically about its show(), hide(), and toggle().



jQuery is a library of functions used for web design. Some of its best known are visual effects such as show(), hide(), and toggle(). Its toggle() flip-flops between show() and hide().

This message is shown or hidden by jQuery toggle()

I’ll be talking about how to use jQuery in web pages in coming posts:)

Source:

w3schools

Pollock, John. jQuery: A Beginner’s Guide. Toronto: McGraw-Hill, 2014.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Business and Economics: The price of oil, Part II

The tutor looks into why oil is less than half its price two years ago.

Back when oil was over $100, I thought I understood the reason: China, India, and other developing countries have a growing middle class. Those swelling ranks are buying cars: there are likely thousands, if not tens of thousands, of new drivers on the planet each month. They didn’t use to buy gasoline; their sudden demand for it increases world oil consumption.

At the same time, I reasoned, oil is relatively rare compared with the demand for it. Supply cannot necessarily increase as quickly as the developing world’s demand. Therefore, the price should be much higher than it was before the rise of India, China, Brazil, and other transforming economies.

In fact, the supply of oil is more responsive than I (and perhaps some others) realized. American production of oil more than doubled from around 4 million bpd (barrels per day) in 2009 to 9.7 million bpd in 2015. Considering world oil consumption is about 96 million bpd, the Yanks can supply 10 percent of the entire world’s needs.

At the same time, US oil consumption has decreased by around 12% since 2005. It suggests that, perhaps, economies will eventually progress past dependence on oil.

Some oil exporters are now reflecting that oil not sold today, may never be. Therefore, the oil that’s cheap to produce should be sold at a profit now. That idea, almost impossible to imagine fifteen years ago, squares off against the opposite, much older one: that development means oil consumption.

It’s very hard to predict the price of oil:)

Source:

qz.com

iea.org

weforum.org

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Business and Economics: ripples from the price of oil

With some reflections, the tutor opens a discussion about the price of oil.

For years, I tutored high school math to young men headed to Alberta or Saskatchewan. Months later, in the oil fields, they made several times what I did. I recall hearing that one of my students, two years after his tutoring with me, was making a quarter million a year.

I never resented what the oil workers made; I celebrated it. Vancouver Island seems not to have a lot of industrial opportunity; optimistically, there was opportunity you could point to, east.

After the closure of the pulp and paper mill here – I believe in 2009 – many of Campbell River’s fathers left for the oil fields as well. Often they made much more there. Oil receipts kept families living here.

Eventually, a high price of oil came to mean prosperity for Campbell River. With so many of our people working in Fort McMurray or other oil towns, the job situation here often wasn’t considered. Rather, the job situation there was foremost. Campbell River remained an industrial town; the industry was just being carried on in the oil fields.

Inevitably, the drop in oil prices has brought job loss. In my own mind, a question has emerged that I haven’t considered since university, over 20 years ago: Is industrial money too fickle to plan a future around?

As my wife points out, when the people involved in primary (production) industries are working, they seem to make more than anyone. Their earnings infuse their surroundings with opportunity. In my experience, there is no better place to live than a blue-collar town where the mill, mine, or plant is hiring.

Yet, primary industry – the oil industry being a perfect example – seems the most vulnerable to economic cycles. Jobs like teaching or medical professions, as well as trades like auto mechanics or plumbing, seem much more secure. Considering the future, a person can’t ignore these considerations – especially in a place like Vancouver Island, where primary industry seems to be on a long-term decline.

I’ll be talking more about the price of oil in coming posts:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Calculator usage: how to get rid of “P” or “PEN” on some Sharps

The tutor offers the simple way to return from the “P” or “PEN” state on some Sharps.

Sometimes a student will bring me a Sharp calculator: “It’s not working…there’s that ‘P’ on the screen.” In another case, the screen might say ‘PEN’.

In either situation, the calculator has been put in PEN mode, which means base 5. On many Sharps this can happen pretty easily, since the combination to do so is

2ndF =

If 2ndF is unwittingly pressed with =, you end up in PEN mode.

The mode you want to be in is DEC (decimal) mode. The way to return to it on the Sharps I own is

2ndF +

You’ll see DEC above the right key to use if + doesn’t work.

HTH:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Lifestyle: Plant identification from field guide: wall lettuce

The tutor shares another yard find.

I’ve noticed wall lettuce in the yard for at least ten years, but only recently identified it. In the right places, it grows fast. It’s a tall thin plant with leaves that hold the stem all the way around, which is known as “clasping.” Near the base, the leaves have arrowhead-shaped lobes: the end one points out, while those further back point sideways. Further up, the leaves can be simpler.

The flowers are small, yellow, and five-petaled. They occur at the ends of branches, in bunches. I haven’t noticed a fragrance from them.

To say that wall lettuce prefers to grow near a wall is accurate in my experience: I’d elaborate that it seems to like wall edges.

HTH:)

Source:

Pojar, Jim and Andy MacKinnon. Plants of Coastal British Columbia. Vancouver:
  BC Ministry of Forests and Lone Pine Publishing, 1994.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Web Design: JavaScript toggle

The tutor continues from yesterday’s example of dynamic content.

In yesterday’s post I discussed how to change an element’s appearance on a page with JavaScript. Today, I’ll discuss how to change it back and forth.

This paragraph’s style can be toggled back and forth.

The mechanism of the toggle is a JavaScript if statement:

var x = document.getElementById(“element”).style;
if (x==”teal”){
back to normal
}

else{
change color to teal, background to yellow, font size, etc
}

Source:

w3schools

dustindiaz.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Web design: JavaScript: changing style of an element

The tutor returns to JavaScript to talk about changing element style.

With JavaScript, the appearance of an element on the page can be changed by actions offered to the visitor. For example, the button below can be clicked to change this paragraph.

The command to change an element’s text color to green from within a JavaScript function is

document.getElementById(“element_id”).style.color=”green”;

The command to increase an element’s font size by 75% is

document.getElementById(“element_id”).style.fontSize=”175%”;

I’ll be discussing more JavaScript style changes in coming posts:)

Source:

w3schools

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Biology: digestive system: sphincters

The tutor discusses the use of sphincters in the digestive system.

A sphincter is a ring of muscle that, when tightened, can restrict passage between two areas. The digestive system uses them at either end of the stomach. At the front end, the cardiac sphincter keeps acidified food from spilling back up. At the exit, the pyloric sphincter controls the entry of acidified food into the duodenum. Its release is coordinated with the arrival of pancreatic juice, which contains sodium bicarbonate to neutralize the acid.

The anal sphincter, which controls the exit of feces from the body, is perhaps a familiar example of one.

Source:

Mader, Sylvia S. Inquiry into Life, 9th ed. Toronto: McGraw-Hill, 2000.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.