Sublime Text 2 注册激活办法以及简单的使用介绍

在网上看到一篇文章,关于现在流行的代码编辑器,突然看到这个Sublime Text 2,于是勾起了兴趣,之所以对这个编辑器感兴趣除了它小小的体积之外,更在于它那酷酷的深色界面.

Sublime Text 2 程序工作界面
Sublime Text 2 程序工作界面

先来一段简单的介绍:

速度快并且功能丰富,几乎支持所有的编程语言。支持多行选择,代码缩放,键盘绑定,宏,拆分视图等等。同时拥有全屏和免打扰 模式。非常适合大屏幕的显示。和TextMate类似,拥有一个非常活跃的社区支持,而且开发了很多的插件和bundle,以前我们介绍过的使用sublime text 2开发Javacript和jQuery,我们可以看到Sublime的强大。它同时支持Linux,Windows和OSX。这个编辑器可以无限期试用。当然你可以花59美元购买,并且安装到任何一台你自己的电脑上。

继续阅读“Sublime Text 2 注册激活办法以及简单的使用介绍”

[好歌推荐]Matthew Barber – And You Give

歌名: And You Give

歌手: Matthew Barber

专辑: Ghost notes

歌词:

It started out two winters past
Time stood still we were moving too fast
You ran away April, May and June
When you came back I was over the moon

I was high, I was high over the moon
You were there, you were there midnight and noon oh
Bring it back, bring it back
We started too soon
I was high, I was high over the moon oh oh

Then came fall babe and we fell hard
Bruised our bodies, skinned our knees and our hearts
Then I got sick yeah but no one could tell
Now I drink your love drink right from the well

And it’s good and its good right from the well
Wanna taste, wanna touch, wanna see and smell oh
And it feels like it feels, heals me so well
Wanna drink, wanna drink right from the well oh oh

Now here I sit in my burning cell
Summer sun beating hotter than hell
I need your love like the air I breath
I need it more than you could ever believe

And you give and you give, give it to me
And you give and you give all that I need oh
And I take and I take, blood that you bleed
And you give and you give, give it to me oh

And you give and you give, give it to me
And you give and you give all that I need oh
And I take and I take, blood that you bleed
And you give and you give, give it to me oh

音乐轻松,优美…另外也推荐Where the river bends 😀

Matthew Barber – And You Give

Zen Cart 1.5 图文安装过程全说明

最近公司需要我来维护一个zen cart后台系统的电子商务网站.说目前的网站问题很多,包括很多系统模块功能都出现问题.好吧,既然如此我又要在本地装个zen cart后台系统了.第一次装这个,还是跟大多数一样,从官方下载了zen-cart-v150-utf8-20120309.zip安装包后,解压所有文件(2222个文件共12MB= =!)并放置在你的本地PHP服务器环境的网站访问目录,例如:”E:\wamp\www\mall”,在没有设置本地域名直接访问本地网站的情况下,通过输入”http://localhost/mall”可以访问,或是你希望通过设置本地域名访问,例如”http://m.net”,当然具体办法不再复述,不会的话可以看看此文Apache创建本地域名的服务器(WAMP环境).我为了方便,我也简单修改了hosts文件和httpd-vhosts.conf.那么此刻输入http://m.net,将会提示下面内容:

Zen Cart 1.5 未安装时访问效果
Zen Cart 1.5 未安装时访问效果

于是继续点击安装:

继续阅读“Zen Cart 1.5 图文安装过程全说明”

儿时的回忆之格什温<<蓝色狂想曲>>有感

前几天, 听着音乐时,随机播放到这一曲<<Rhapsode in Blue(extract)>>,来自<<Best Piano Classics 100 (CD2)>>内track03.突然间,心中一股难以表达的心情.当然其他专辑也有,比如:<<The 50 Most Essential Pieces of Classical Music>>,当然也有电影Manhattan发行于1979年的插曲也是.

就是这曲,有一次几乎花了2,3个小时翻遍了每一首歌曲,却没有找到它,这次偶然再次遇到,当然不能再次忘记它的曲名,那么这个交响乐实际上应该是叫做<<Rhapsody in Blue>>于1924年美国作曲家乔治·格什温创作的.至于他的音乐背景大家可以自己去了解下.

好了,进入正题,为何称之为儿时的回忆,记得很小的时候,至于小学几年级看过电视节目上一部动画短片.当时感触也很深,至今记忆犹新.回想,从来没有想过小时候竟然有机会接触到如此名曲,甚至是当地电视台节目,每天大概6,7点因为电视节目少而随便穿插的一些国外的动画.现在回想,原来十五年前,当地电视台的节目策划人如此有品位…现如今再次看了一遍这段动画,觉得毫不落后,仍有着现代气息…只在网上找到了土豆的视频动画地址,与大家分享一下了.

不知道大家看了有什么感受…只能感觉大现代都市,繁华,仓促,不同角色的人们为生活而努力奋斗,虽然生活充满了无奈,心酸,悲伤,我们拥有的梦想始终难以实现,我们仍在继续…动画充实饱满,虽然不清楚作者的本意是否如此,但总能给人一些共鸣.极其感染力的节奏,让人回味无穷.

在网上也找了许多版本,感觉也都差不多.这里分享给大家,可以右键另存为,或者直接下载:

Gershwin: Rhapsody in Blue—Richard Trythall, pianist  18.1MB (00:19:51)

Rhapsody In Blue—Andre Previn,伦敦交响乐团 20.5MB (00:15:00)

格什温 蓝色狂想曲—Unknown 😯 6.54MB (00:03:33)

好了就写这么多吧.电脑上还有下载几个版本自己收藏着咯

如何为第一个或最后一个元素甚至是某类规律元素添加样式?

有时候,我们在写DIV+CSS的时候,在某一类相同的元素内想给其中的第一个元素或者最后一个元素,甚至是其中某些特定的有规则的排列的元素添加特别的CSS样式,我们该如何下手?下面我将给大家将就一些在CSS中十分实用的方法.

首先,你可以手动使用下面这段代码来应用修改某个元素的效果(当然这个办法很笨,是个人都知道):

http://jsfiddle.net/kingterrors/szCM9/embedded/result,html,css/

PS:由于近日(2014年6月)jsfiddle无法正常访问,可能受内网影响,现将之前所有jsfiddle预览去除,不过你仍然可将以上地址拷贝到浏览器预览,或选择尝试以下代码:

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>how to remove margins for first last elements</title>
<style type="text/css">
ul {
    border: 1px solid #000;
    margin: 0;
    padding: 0;
    list-style: none;
    float:left;
}
ul li {
    background:#eee;
    color: #F00;
    margin: 50px;
}
.first {
    color: #000;
    margin-top: 0 !important;
    margin-left: 0 !important;
}
.last {
    color: #0f0;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}
</style>
</head>
<body>
<ul>
  <li class="first">Hello, This is first element</li>
  <li>WOW, so many elements</li>
  <li>WOW, so many elements</li>
  <li>WOW, so many elements</li>
  <li class="last">Here it is, The last element</li>
</ul>
</body>
</html>

当然你也可以利用:first-child伪类和:last-child伪类(当然这种效果IE6完全不支持,IE7,IE8部分支持,其中IE7和IE8效果相同,不支持:last-child),比如:

http://jsfiddle.net/kingterrors/44GzJ/embedded/result,html,css/

PS:由于近日(2014年6月)jsfiddle无法正常访问,可能受内网影响,现将之前所有jsfiddle预览去除,不过你仍然可将以上地址拷贝到浏览器预览,或选择尝试以下代码:

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>how to remove margins for first last elements</title>
<style type="text/css">
ul {
    border: 1px solid #000;
    margin: 0;
    padding: 0;
    list-style: none;
    float:left;
}
ul li {
    background:#eee;
    color: #F00;
    margin: 50px;
}
ul li:first-child {
    color: #000;
    margin-top: 0 !important;
    margin-left: 0 !important;
}
ul li:last-child {
    color: #0f0;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}
</style>
</head>
<body>
<ul>
  <li>Hello, This is first element</li>
  <li>Whidy! so many elements</li>
  <li>Whidy! so many elements</li>
  <li>Whidy! so many elements</li>
  <li>Here it is, The last element</li>
</ul>
</body>
</html>
IE6,IE7,IE8都不能完好支持first-child和last-child伪类

其中还有种很另类的方式,给任意元素的规则性的添加伪类.比如你有5个li元素,你想让每两个li有区别,比如应用在有些特殊列表,你给每两行加上不同的背景色,我这里随便做了个效果给大家参考:

http://jsfiddle.net/kingterrors/76jxP/embedded/result,html,css/

PS:由于近日(2014年6月)jsfiddle无法正常访问,可能受内网影响,现将之前所有jsfiddle预览去除,不过你仍然可将以上地址拷贝到浏览器预览,或选择尝试以下代码:

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>how to remove margins for first last elements</title>
<style type="text/css">
ul {
    border: 1px solid #000;
    margin: 0;
    padding: 0;
    list-style: none;
    float:left;
}
ul li {
    background:#eee;
    color: #F00;
    margin: 50px;
}
ul li:nth-child(2n) {
    color: #000;
    margin-top: 0 !important;
    margin-left: 0 !important;
}
</style>
</head>
<body>
<ul>
  <li>Hello, This is first element</li>
  <li>Whidy! so many elements</li>
  <li>Whidy! so many elements</li>
  <li>Whidy! so many elements</li>
  <li>Here it is, The last element</li>
</ul>
</body>
</html>

当然这个在IE8以下包括IE8的版本都是不被支持的 😯 !

最后总结一下:first-child和:last-child伪类在IE6下是完全不支持的,而IE7和IE8仅支持:first-child,IE9是完全支持的.而:nth-child只有IE9支持,其他的比如Safari 3+, Firefox 3.5+ and Chrome 1+是完全支持以上效果的.

另外,你也可以用jq来控制某个任意元素的样式,之前我也提到过,有兴趣可以看看列表中最后一个元素样式清除修改方法 🙄

如果有兴趣可以参考下原文,Remove Margins for First/Last Elements