Thursday, January 22, 2015

Winterizing Plumbing and Pipes

Contrary to popular belief, pipes don't burst at the point where water freezes, but somewhere between the freeze and a closed faucet, such as the kitchen faucet or washing machine. When the pressure builds due to ice blockage, it has nowhere to go but through the pipe walls, leading to extensive water damage. You can avoid this problem by properly insulating the plumbing pipes in your home.

1. Pipe Insulation
Your pipes are more susceptible to freeze damage when temperatures drop to 20 degrees Fahrenheit or below. If you live in an area where these winter temperatures are the norm, take extra caution when insulating pipes. For example, in Denver, the average low temperature is 23 degrees Fahrenheit beginning in November, and temperatures can drop into the teens in the months that follow. For pipe winterization, add a thicker layer of insulation around your pipes.

Insulate the pipes in all unheated areas, as they are most likely to freeze. Wrap the pipes in insulation tubes made of polyethylene or fiberglass. Measure the outside diameter of your pipes to make sure you purchase the correct size of tube. Take extra care with pipes that have frozen during previous winters or have been repaired in the last 12 months. According to John Ward, a Denver based plumber with Applewood Plumbing, Heating and Electric, these pipes are more susceptible to damage. He also suggests wrapping pipes in heat-tape prior to insulating. Make sure you follow the manufacturer's instructions when using heat-tape to avoid damage.

2. Let the Faucets Drip
On nights when the temperature is expected to drop below freezing, turn on faucets along the exterior walls to create a small, steady drip. This eliminates pressure that can build between the faucet and an ice blockage, so even if a pipe freezes, it may not burst.

3. Open Cabinets
Open all sink-base cabinet doors along exterior walls to allow more heat to reach the pipes.

4. Exterior Cracks
Note any cracks or holes along the outside walls and foundation of your home. Filling holes and cracks with spray foam insulation and caulking can help stop the cold air from coming into contact with your water pipes during extremely cold weather.

5. Seal off Crawl Space
Pier and beam homes with ventilated crawl spaces should be sealed against the cold weather. Cover your vents with heavy-duty pieces of cardboard cut to fit the vents, duct taping the cardboard in place. Don't forget to seal off access to the crawl space. If you have a basement, look for cracked basement windows that could allow cold air to make contact with pipes. Check for worn or missing insulation around garage and utility doors. Reducing the amount of cold air in the area minimizes your pipes' vulnerability.

R: Scoping of free variable names

When a function in R uses a 'free' variable -- a variable that is not defined in the function nor an argument of the function -- where R finds the value of the variable can be confusing. Intuitively, we might expect R to use dynamic scoping: the value is found where it is defined in the environment where the function is called or in the nearest environment above that. However, R does not work this way. It uses lexical scoping in which the sequence of environments to look in is determined when the function is defined, but the value is determined when the function is called.

In short:

Where when defined -- what when called.

The following code illustrates the principle:

#
# Scoping
#

a <- "Global"
f <- function() {

g <- function(x) cat( x,a,"\n")
g("called in f before assn of a:")
a <- "in f"
g("called in f after assn of a:")
h <- function(x){
a <- "defined in h"
g(x)
}
h( "h calling g from in f:")
a <- "redefined in f"
h("h calling g in f after redefining a")
rm(a)
h("h calling g after removing a")
}

f()


The output is:

called in f before assn of a: Global
called in f after assn of a: in f
h calling g from in f: in f
h calling g in f after redefining a redefined in f
h calling g after removing a Global

An advantage of lexical scoping over dynamic scoping is that the behaviour of the function is more easily determined when it is defined. If a programmer wishes to use the value of a variable in which the function is called, it merely needs to be included among the arguments to the function.

There is an excellent article by John Fox comparing scoping in R and in S-Plus.

Monday, January 19, 2015

姜文谈中国女孩为什么要嫁给洋人?

在对生活和艺术的感情上,我们一点儿不比洋人差”

  我在国外见到的许多中国人,实际上都很土,对自己祖国的历史文化一无所知,在
国外又过着很低层的生活,不敢去豪华场所,也不敢乱花钱,干什么事都小心翼翼、缩
手缩脚。他们津津乐道地问你炫耀的东西,在你看来一文不值。我在西班牙碰到一个中
国人,他对我大夸西班牙的海湾如何美。我问:“你在国内都去过什么地方?”他说:
“太阳岛。”我说:“那不叫海湾,你去看看海南岛,看看青岛、北戴河、大连,都有
很漂亮的海湾。”这些人在中国人面前把自己当外国人;而在外国人面前,则自觉地把
自己当孙子,总想靠着巴结外国人得到点什么。这种人在心态和人格上没有一点儿自尊
,让外国人怎么能看得起!

  我并不否认外国经济的发达和文化的进步,但你无论到哪儿,都洗不掉这张中国人
的脸,改变不了自己的黄皮肤黑眼睛。当你把自己当成美国人时,他们会很明白地告诉
你:“你是中国人”。但你腆着脸享用美国人创造出的财富时,你却没有一点主人的自
尊感。

  有些中国女孩宁肯随便嫁给一个老外,说是“中国没有好男人”。其实那洋人可能
就是一个笨蛋,在外国人堆里混不出样儿来,到中国混江湖来了。我们有的部门却不加
慎重考察,轻易地把什么人冠之以“外国专家”,“国际友人”。我认识一些外国朋友
,在国外时平平常常,一到中国周围环境害得他放气,觉得自己高中国人一筹,还有好
多妙龄好姑娘追求着。一个外国人就跟我谈过他的真实感受:“我在国内屁也不是,而
在中国我有妞泡,而且是名妞”。这些在中国能娶名演员的外国人,在他们的国家连演
员的面也见不着。

  对于外国的某些人,我们给他们的脸太多了。有些人在美国不过是商业片明星,可
是中国却被誉为“有学者风度”的艺术家,甚至电影界德高望重的老前辈都去接见他,
大家突然之间都成了普通影迷了。你越这样做,人家越不尊重你。说句老实话,哪一个
影星会赶忙尊重他的影迷?他觉得彼此根本不在一个层次上。

  在外国混血儿受歧视,因为血统不纯正。而在中国,混血儿是时髦,夸一个人长得
好:“你看他长得真帅,跟外国人差不多。”有的人硬把自己的祖宗往外国血统上连,
似乎只有这样才能证明自己的高贵。生为中国人对自己的民族这么不自尊不自信,这是
我们最大的悲剧!

  中国人产生崇洋媚外心理的一个很重要原因,是没出过国导致的孤陋寡闻。爱国心
最易产生在国外,当你看到外国人的能力不如你而你却由于民族和肤色的限制得不到他
拥有的财富和地位时,一种民族自尊自强的心理便会油然而生…… 
--
Yet nature is made better by no mean. But nature makes that mean. So over that art, 
which you say adds to nature, is an art, that nature makes.