因为需要配置centos一些功能,系统自带yum仓库不全面很麻烦,百度一下就找到了第三方yum仓库。
安装第三方EPEL软件库
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm导入key(不导入的话会出错)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6把服务器的包信息下载到本地电脑缓存起来
给我一个需求,还你一个项目——别管它是什么。这就是全栈。
因为需要配置centos一些功能,系统自带yum仓库不全面很麻烦,百度一下就找到了第三方yum仓库。
安装第三方EPEL软件库
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
导入key(不导入的话会出错)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
把服务器的包信息下载到本地电脑缓存起来
Because I needed to configure some features on CentOS and the yum repositories that come with the system aren’t comprehensive enough — which is a real pain — I searched on Baidu and found third-party yum repositories.
Install the third-party EPEL software repository
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Import the key (things will break if you don’t)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Download the server’s package information and cache it locally on your machine
天黑了,夜色醉了……
时间重新回到2014年之前。天上不时有闪过明眸,我呆在尝尝未甘霖的雨露里慢慢享受着清晨着些……
校园上,暗绿色的草坪,起伏游荡有种说不出的沉重,默默逝色。我在,看着反复起落的情绪中陶醉无边。有时甚觉时间的颓败是一种生命的惩罚,只因我拒绝外在,拒绝失误……
断了阳光的玄子,间隙上插着儿时的微笑,不明间,不然已。一层层泡在天空的毛雪,是初春纤维的肆虐,这已出乎我的觉察,竟有些敬畏生命。感知你所知道的世界,觉察你所想达到的境界,淌洋于四周风的呼吸……
我在,这地方有如此多的爱。我在,还好我已经在。 别了,我的那个世界,涩甜的泉水,愤怒的不满,吼叫时代,终结着我和我的世界。而今6年有余,不曾再会回归……
不再,永不在,尚存已不多时日。 其实,北方的杏仁很苦,涩涩的苦……
It’s dark now, the night has grown drunk…
Time returns to before 2014. Bright eyes flicker across the sky now and then; I linger in the sweet rain I never tire of tasting, slowly savoring these early-morning hours…
On campus, the dark-green lawn heaves and wanders with an indescribable heaviness, silently fading. I am here, reveling boundlessly in emotions that rise and fall again and again. Sometimes I feel that the decay of time is a punishment for life — only because I refuse the outside, refuse to slip…
The mystery that has cut off the sunlight wears a childhood smile in its gaps, unknowing, unwilling. Layer upon layer of woolly snow steeped in the sky is the rampage of early-spring fibers; this has gone beyond my awareness, and I even feel a certain awe before life. Perceive the world you know, sense the realm you wish to reach, drift in the breathing of the wind all around…
I am here; this place holds so much love. I am here — thank goodness I am already here. Farewell, that world of mine: the astringent-sweet spring water, the furious discontent, the age of shouting, ending me and my world. And now, more than six years on, never to return again…
No more, never more; not much time remains. In truth, the almonds of the North are very bitter — astringently bitter…

开源软件现在成为整个互联网时代的支撑技术,你可能已经无法离开由开源软件构建起来的网络世界了。下面我们就来看看一些最重要的开源技术。

Open source software has now become the supporting technology of the entire internet era, and you probably can no longer do without the online world built on open source software. Below, let’s take a look at some of the most important open source technologies.
[ Article author: 张宴 ] This article explains how to compile the Libevent 2.0.10 static link library on Windows using Microsoft Visual Studio 2005, and then use that Libevent static link library to implement a simple HTTP web server program: httpd.exe. Assume Visual Studio 2005 is installed at “D:\Program Files\Microsoft Visual Studio 8\“, and that Libevent 2.0.10 is extracted to “D:\libevent-2.0.10-stable”.

在 爱丁堡有个叫Wojtek的传奇。不知你有没有见过这么一辆公交车,上面印有一头抱着炮弹的西伯利亚棕熊。它就是传说中的Wojtek,到过伊朗、跟波兰 人摔过跤、能喝酒、参过军、打过二战、扛过炮弹、揍过德国人,最终在爱丁堡动物园安度晚年。(来源:英国那些事儿维基百科 英国邮报)

In Edinburgh there is a legend named Wojtek. I wonder if you’ve ever seen a bus with a Siberian brown bear clutching an artillery shell printed on it. That is the legendary Wojtek, who went to Iran, wrestled with Poles, could drink alcohol, served in the army, fought in World War II, carried artillery shells, punched Germans, and finally spent his later years in Edinburgh Zoo. (Source: Britain’s Those Things, Wikipedia, UK Daily Mail)
by zhangxinxu
首先说说何为两端对齐。下面这个截图是word中一段英文左对齐的右边缘截图:
可以看到右侧是参差不起的,现在,选中文字,点击word上方的两端对齐按钮,如下图:
结果文字的右边缘就成了这样:
右侧完全对齐了,也就是整篇文字全部沿着左边缘和右边缘对齐显示了。 然后这里的“列表元素”指的是具有类似结构的重复列表元素,例如QQ校友中的图片列表:
所谓列表元素的两端对齐就是每行列表元素的第一个元素与父容器的左边缘重合,最后一个元素与父容器的右边缘重合。例如淘宝首页的热卖单品,或是人人网的热门分享列表(如下截图):
我想我们平时写页面的时候也经常会拿到的列表元素两端对齐的体验舒服的设计图吧。
by zhangxinxu
First, let’s talk about what two-end alignment is. The screenshot below is the right edge of a left-aligned English paragraph in Word:
As you can see, the right side is ragged. Now select the text and click the justify button at the top of Word, as shown below:
The right edge of the text then looks like this:
The right side is now perfectly aligned, meaning the whole block of text is displayed flush against both the left and the right edge. And here, “list elements” refers to repeated list elements with a similar structure, for example the image list on QQ Alumni:
Two-end alignment for list elements means that the first element of each row lines up with the left edge of the parent container, and the last element lines up with the right edge of the parent container. For example, the hot-selling items on the Taobao homepage, or the popular shares list on Renren (screenshot below):
I think that when we build pages day to day, we often get design mockups with comfortable two-end aligned list elements too.
之前, 我在分析Javascript的This关键字的时候, 说过, 当使用inline的方式写dom元素的事件处理函数的时候, 采用的是引用的方式. 刚好nullbyte童鞋给我提供了一个很有意思的Case:
<img id="foo" src="xxx" onerror=" alert('error');
} function foobar() {
alert('www.laruence.com'); " />
<script>
alert(document.getElementById("foo").onerror);
</script>
在IE下试试看.. 不过, FF和Chrome下都不行, 应该是FF和Chrome都会验证html代码的合法性.
Earlier, when I was analyzing the Javascript this keyword, I said that when you write a DOM element’s event handler inline, it is applied by reference. It just so happens that a friend named nullbyte gave me a very interesting case:
<img id="foo" src="xxx" onerror=" alert('error');
} function foobar() {
alert('www.laruence.com'); " />
<script>
alert(document.getElementById("foo").onerror);
</script>
Try it in IE.. Though it doesn’t work in FF or Chrome either — presumably because both FF and Chrome validate the legality of the HTML code.
Early morning, the blinding sunlight clings to the earth. I often miss the days of old. When you could soak yourself in the streets playing. Come summer, catching cicadas and roasting them over a fire. Catching grasshoppers, teasing the kitten until it chased us all over the house. Digging out hedgehogs, plucking the spines off their bodies. Because of childhood, because of youth, in ignorance, without restraint. These days I rarely stay in my hometown, and I’ve never seen the glimmering fireflies, or the fields and fields of peanuts and edamame. Looking back I always giggle at my own ignorance, and at the maturity I have now. There’s a willful stubbornness, a silly support, a clumsy giving. They all say I’m still me, just missing the old me. I’m glad — I only do me. With the sunset there, I don’t worry about the gloomy air. I always love her with my whole world.
关于PHP的浮点数, 我之前写过一篇文章: 关于PHP浮点数你应该知道的(All ‘bogus’ about the float in PHP) 不过, 我当时遗漏了一点, 也就是对于如下的这个常见问题的回答:1
2
3
4<?php
$f = 0.58;
var_dump(intval($f * 100)); //为啥输出57
?>
Regarding PHP’s floating point numbers, I wrote an article before: What you should know about PHP floats (All ‘bogus’ about the float in PHP) However, I left one thing out at the time, namely the answer to this common question:1
2
3
4<?php
$f = 0.58;
var_dump(intval($f * 100)); //why does it output 57?
?>
by 张宴 写了一个简单的发送HTML邮件的PHP函数。 函数说明:send_mail(“发件人地址”, “收件人地址”, “邮件主题”, “邮件正文”); 示例:send_mail($from, “info@zyan.cc”, “这是邮件的主题”, “
这是邮件正文
“); 代码如下:by 张宴 wrote a simple PHP function for sending HTML emails. Function description: send_mail(“sender address”, “recipient address”, “email subject”, “email body”); Example: send_mail($from, “info@zyan.cc”, “This is the email subject”, “
This is the email body
“); The code is as follows:
没有找到匹配的文章 🙈