点:win 8 metro风格是用户体验的噩梦
微软全线转移到metro风格是一场豪赌,虽然我个人预感这场赌博会以微软惨败收场。我使用过windows phone 8手机,也抢鲜安装过windows 8操作系统,接下来我想谈谈自己的一点体会。
从"用户-App-信息"到"用户-信息"
认识自己的无知 是认识世界最可靠的方法
微软全线转移到metro风格是一场豪赌,虽然我个人预感这场赌博会以微软惨败收场。我使用过windows phone 8手机,也抢鲜安装过windows 8操作系统,接下来我想谈谈自己的一点体会。
从"用户-App-信息"到"用户-信息"
做好一个产品经理非常不容易,经常容易犯错误。本文详细描述了产品经理经常犯的十大顶级错误。对产品经理、技术负责人、创业者,都可以借鉴。
作者:无招、鬼脚七。无招是一淘网的资深产品专家,对电子商务、数据挖掘类、互联网产品有丰富经验;鬼脚七曾经负责过大淘宝搜索产品,对产品设计和产品管理有自己的思考。
产品经理需要创造产品。上帝也是个产品经理,他创造了人这个产品。
做一个成功的产品非常难,除了有资源、时机等问题以外,更大因素在产品经理自己。好的产品经理能协调资源,能把握时机。但产品经理自己也经常犯错误。一直想写一篇文章,关于产品经理容易犯的错误,但担心自己在产品方面的经验不够多,迟迟没有动笔。
既然是抖干货,也不想多废话。但背景必须交代一下。
我受邀参加过几次百度的开放日活动。这种PM的宣讲,有个好处,你可以把PM和产品对上号,下来再点对点沟通,收获会大得多。
我对百度PM的印象还挺留在俞军(第一代)、李明远(算1.5代?)时代,贴吧、知道无论如何评选,都是殿堂级的。后来的百度确实没做出过几款像样的产品,包括已经废掉的百度Hi,半废掉的空间等。
现在的百度PM到底是第几代,我也不清楚。这几次参加活动,认识了百度App的产品经理和leader,本文就是整理自我们的往来邮件。我尽量不带感情色彩的归纳,希望给各位做移动互联网的兄弟一些启发。文中的数据获得披露授权。
互联网颠覆性创新的10个关键方向,你准备好了吗?
摩 根斯坦利分析师,"网络女皇"Mary Meeker 最新发表了一份《互联网高管需要提问和回答的10个问题(Ten Questions Internet Execs Should Ask & Answer)》研究报告,这10个问题可以认为是互联网颠覆性、破坏性创新的10个关键方向。
看到地脏了,想扫地,然后拿了把扫帚把地扫了,地扫干净了,这就是执行。
目标
执行的过程,首先要确认的是目标:
有个清晰、可评估、可衡量的目标
你的目标是什么?——这里的目标就是把地扫干净。
你的目标到底满足的需求是什么?或解决的问题是什么?
这里满足的需求——把地弄干净;这里解决的问题——把脏的地弄干净了。
<div><p>CSS简写就是指将多行的CSS属性简写成一行,又称为CSS代码优化或CSS缩写。CSS简写的最大好处就是能够显著减少CSS文件的大小,优化网站整体性能,更加容易阅读。</p><p>下面介绍常见的CSS简写规则:</p><div style="page-break-after: always;"><span style="display: none;"><!--more-->& nbsp ;</span></div><h4>一、盒子大小</h4><p>这里主要用于两个属性:margin和padding,我们以margin为例,padding与之相同。盒子有上下左右四个方向,每个方向都有个外边距:</p><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </td> <td> <div> <div>margin-top
:
1px
;
</div> <div>margin-right
:
2px
;
</div> <div>margin-bottom
:
3px
;
</div> <div>margin-left
:
4px
;
</div> </div> </td> </tr> </tbody></table><pre> </pre><p>你可以简写成:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> </td> <td> <div> <div>margin
:
1px
2px
3px
4px
;
</div> </div> </td> </tr> </tbody></table><p>语法 margin:top right bottom left;</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> </td> <td> <div> <div>//四个方向的边距相同,等同于
margin
:
1px
1px
1px
1px
;
</div> <div>margin
:
1px
;
</div> <div>//上下边距都为
1px
,左右边距均为
2px
,等同于
margin
:
1px
2px
1px
2px
;
</div> <div>margin
:
1px
2px
;
</div> <div>//右边距和左边距相同,等同于
margin
:
1px
2px
3px
2px
;
</div> <div>margin
:
1px
2px
3px
;
</div> <div>//注意,这里虽然上下边距都为
1px
,但是这里不能缩写。
</div> <div>margin
:
1px
2px
1px
3px
;
</div> </div> </td> </tr> </tbody></table><p>二、边框(border)</p><p>边框的属性如下:</p><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> </td> <td> <div> <div>border-width
:
1px
;
</div> <div>border-style
:
solid
;
</div> <div>border-color
:
#000
;
</div> </div> </td> </tr> </tbody></table><pre> </pre><p>可以缩写为一句:</p><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> </td> <td> <div> <div>border
:
1px
solid
#000
;
</div> </div> </td> </tr> </tbody></table><p>语法 border:width style color;</p><h4>三、背景(Backgrounds)</h4><p>背景的属性如下:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </td> <td> <div> <div>background-color
:
#f00
;
</div> <div>background-image
:
url
(background.gif);
</div> <div>background-repeat
:
no-repeat
;
</div> <div>background-attachment
:
fixed
;
</div> <div>background-position
:
00
;
</div> </div> </td> </tr> </tbody></table><p>可以缩写为一句:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> </td> <td> <div> <div>background
:
#f00
url
(background.gif)
no-repeat
fixed
0
0
;
</div> </div> </td> </tr> </tbody></table><p>语法是background:color image repeat attachment position;
你可以省略其中一个或多个属性值,如果省略,该属性值将用浏览器默认值,默认值为:</p><ul> <li> <p>color: transparent</p> </li> <li> <p>image: none</p> </li> <li> <p>repeat: repeat</p> </li> <li> <p>attachment: scroll</p> </li> <li> <p>position: 0% 0%</p> </li></ul><h4>四、字体(fonts)</h4><p>字体的属性如下:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </td> <td> <div> <div>font-style
:
italic
;
</div> <div>font-variant
:
small-caps
;
</div> <div>font-weight
:
bold
;
font-size
:
1em
;
</div> <div>line-height
:
140%
;
</div> <div>font-family
:
"Lucida Grande"
,
sans-serif
;
</div> </div> </td> </tr> </tbody></table><p>可以缩写为一句:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> </td> <td> <div> <div>font
:
italic
small-caps
bold
1em
/
140%
"Lucida Grande"
,
sans-serif
;
</div> </div> </td> </tr> </tbody></table><p>注意,如果你缩写字体定义,至少要定义font-size和font-family两个值。</p><h4>五、列表(lists)</h4><p>取消默认的圆点和序号可以这样写list-style:none;,
list的属性如下:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> </td> <td> <div> <div>list-style-type
:
square
;
</div> <div>list-style-position
:
inside
;
</div> <div>list-style-image
:
url
(image.gif);
</div> </div> </td> </tr> </tbody></table><p>可以缩写为一句:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> </td> <td> <div> <div>list-style
:
square
inside
url
(image.gif);
</div> </div> </td> </tr> </tbody></table><p>六、颜色(Color)</p><p>16进制的色彩值,如果每两位的值相同,可以缩写一半。例如:</p><p>Aqua: #00ffff ——#0ff
Black: #000000 ——#000
Blue: #0000ff ——#00f
Dark Grey: #666666 ——#666
Fuchsia:#ff00ff ——#f0f
Light Grey: #cccccc ——#ccc
Lime: #00ff00 ——#0f0
Orange: #ff6600 ——#f60
Red: #ff0000 ——#f00
White: #ffffff ——#fff
Yellow: #ffff00 ——#ff0</p><h4>七、属性值为0</h4><p>书写原则是如果CSS属性值为0,那么你不必为其添加单位(如:px/em),你可能会这样写:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> </td> <td> <div> <div>padding
:
10px
5px
0px
0px
;
</div> </div> </td> </tr> </tbody></table><p>试试这样吧:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> </td> <td> <div> <div>padding
:
10px
5px
00
;
</div> </div> </td> </tr> </tbody></table><p>八、最后一个分号</p><p>最后一个属性值后面分号可以不写,如:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> </td> <td> <div> <div>#nav{
</div> <div>border-top
:
4px
solid
#333
;
</div> <div>font-style
: normal
;
</div> <div>font-variant
:
normal
;
</div> <div>font-weight
: normal
;
</div> <div>}
</div> </div> </td> </tr> </tbody></table><p>可以简写成:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> </td> <td> <div> <div>#nav{
</div> <div>border-top
:
4px
solid
#333
;
</div> <div>font-style
: normal
;
</div> <div>font-variant
:
normal
;
</div> <div>font-weight
: normal
</div> <div>}
</div> </div> </td> </tr> </tbody></table><p>九、字体粗细(font-weight)</p><p>你可能会这样写:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> </td> <td> <div> <div>h
1
{
</div> <div>font-weight
:
bold
;
</div> <div>}
</div> <div>p{
</div> <div>font-weight
:
normal
;
</div> <div>}
</div> </div> </td> </tr> </tbody></table><p>可以简写成:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> </td> <td> <div> <div>h
1
{
</div> <div>font-weight
:
700
;
</div> <div>}
</div> <div>p{
</div> <div>font-weight
:
400
;
</div> <div>}
</div> </div> </td> </tr> </tbody></table><h4>十、圆角半径(border-radius)</h4><p>border-radius是css3中新加入的属性,用来实现圆角边框。</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div>9</div> </td> <td> <div> <div>-moz-border-radius-bottomleft:
6px
;
</div> <div>-moz-border-radius-topleft:
6px
;
</div> <div>-moz-border-radius-topright:
6px
;
</div> <div>-webkit-border-bottom-left-radius:
6px
;
</div> <div>-webkit-border-top-left-radius:
6px
;
</div> <div>-webkit-border-top-right-radius:
6px
;
</div> <div>border-bottom-left-radius:
6px
;
</div> <div>border-top-left-radius:
6px
;
</div> <div>border-top-right-radius:
6px
;
</div> </div> </td> </tr> </tbody></table><p>可以简写成:</p><pre> </pre><table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <div>1</div> <div>2</div> <div>3</div> </td> <td> <div> <div>-moz-border-radius:
0
6px
6px
;
</div> <div>-webkit-border-radius:
0
6px
6px
;
</div> <div>border-radius:
0
6px
6px
;
</div> </div> </td> </tr> </tbody></table><p>语法 border-radius:topleft topright bottomright bottomleft</p></div>
<p>打开/etc/selinux/config</p><p>将selinux=enforcing或permissive改成disabled。</p><p>记得要重新启动服务器!</p><p>当然还要确定以下问题:</p><p>1, 用户是否被 vsftpd 限制登录, 比如用户名在 /etc/ftpusers 中,并被阻止登录了</p><p>2, vsftpd.conf 中是否打开了pam认证的选项 (自己编译安装的时候常因为这个出错) (看vsftpd.conf中是否有pam_service_name=ftp或vsftpd.到底是哪个要看
PAM模块的服务文件/etc/pam.d下是谁.我的是ftp且它的配置如下:</p><p>#%PAM-1.0
auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
auth required /lib/security/pam_unix.so shadow nullok
auth required /lib/security/pam_shells.so
account required /lib/security/pam_unix.so
session required /lib/security/pam_unix.so
如果/etc/ftpusers有的用户将被deny</p><div style="page-break-after: always;"><span style="display: none;"><!--more-->& nbsp ;</span></div><p>3, 相关文件夹的权限是否正确.</p><p>关于“vsftpd 部分本地用户不能登录,部分可以”的问题,
系统中原来就有的本地帐号都不能登录,我的/etc/vsftpd/vsftpd.conf文件的配置如下:</p><p>local_enable=YES
write_enable=YES
chroot_local_user=YES
pam_service_name=vsftpd
/etc/pam.d/vsftpd存在且正常。</p><p>登录时错误信息都是一样的:
500 OOPS: cannot change directory:/home/xxxx
Login failed.
421 Service not available, remote server has closed connection</p><p>他们的home目录都是/home/xxxx。/home和/home/xxxx的权限都是755。
以上这些帐号都不能ftp登录,这些都是平常经常使用的,可以用shell登录的。</p><p>我新创建了一个usr1帐号
# useradd -G test -d /tmp/usr1 usr1
能ftp登录,他的home为/tmp/usr1,在/分区上。而/home我是mount到/dev/hda9上的。
#mount
/dev/hdb1 on / type ext3 (rw)
/dev/hda9 on /home type ext2 (rw)</p><p>所以,我猜想:是否是由于/home分区的原因,而造成“主目录在/home分区的帐号”都不能登录呢?</p><p>为了验证以上设想,我试着再创建了一个帐号
useradd -G test -d /home/usr3 usr3
/home, /home/usr3 的权限都是755。</p><p>usr3 ftp登录失败。
500 OOPS: cannot change directory:/home/usr3
Login failed.
421 Service not available, remote server has closed connection</p><p>至此,我觉得可以确定是由于/home分区的原因,而造成“主目录在/home分区的帐号”都不能登录。</p><p>参考文章:
I finished my second upgrade to Fedora Core 4. Not everything is ironed out yet with the build of course. But one thing is for sure a lot has happened to the RedHat I knew before.</p><p>I must say of all the changes, for me the nicest addition is the new SELinux extensions. For deep background on the reasons for and theory of SELinux read, The Inevitability of Failure: The Flawed Assumption of Security in Modern Computing Environments</p><p>The more I work with SELinux the more I realize I need to know about it, and how exactly it does all its stuff. It certainly changes things relating to users, directories and access. As I am starting to learn it, I’m sure I’m doing things the hard-way. [:)]</p><p>The major difference, so far for me, in Red Hat’s SELinux is the way ftp is handled. vsftpd is still the server which is great. However, it seems to be designed to run as a daemon rather than invoked via xinet.d. If you grab a working copy of the xinet.d file for vsftpd you can invoke it via xinet.d wrapper. I did my first server upgrade in this manner. The current one I am trying as a daemon. I certainly think I will miss some of the features that the xinet.d wrapper brings, and may yet return to it.</p><p>Of all the issues I saw most notable is if you want to enable chroot directory’s outside of the normal /home/xxx vsftpd. These will fail with a</p><p>500 OOPS: cannot change directory: /mnt/xxxxx</p><p>I was able to use ftp if I logged in with an account with a directory in /home, but once I set a user account to have a home drive outside of /home (in this case on a mounted secondary disk) vsftpd barfs the above.</p><p>I found information at the NSA that indicates you can disable SELinux protection of the ftp daemon.</p><p>setsebool -P ftpd_disable_trans 1</p><p>This seems a bit drastic. It certainly works for now though.</p><p>I think ultimately the issue resides with policies, but as SELinux policies are new to me, it will take time before it all gets sorted out. As I spend time with the new SELinux extensions in Fedora Core 4 I will keep you updated on my thoughts and configuration lessons.</p><p>解决办法:
# setsebool ftpd_disable_trans 1</p><p># service vsftpd restart</p><p>在ssh输入命令:
setsebool ftpd_disable_trans 1
为避免每次开机都要作这个操作,可在setsebool命令后面加上-P选项,使改动永久有效。
service vsftpd restart</p><p>解决方法如下,需要将capability模块加载,
手动加载模块:
# modprobe capability
或者编译进内核:
CONFIG_SECURITY_CAPABILITIES: This enables the “default” Linux capabilities functionality.
If you are unsure how to answer this question, answer Y.
Symbol: SECURITY_CAPABILITIES [=y]
Prompt: Default Linux Capabilities
Defined at security/Kconfig:56
Depends on: SECURITY
Location:
-> Security options
-> Enable different security models (SECURITY [=y])</p>
<p>一、 安装apache</p><p>先安装gcc编译器</p><p>yum install gcc gcc-c++ gcc-g77</p><p>如果系统中没有make工具就执行下面这条命令安装,后面要用到它</p><p>Yum install make</p><p> </p><p>安装apache需要用到这些文件</p><p>apr-1.4.6.tar.gz-----------apache可移植库</p><p>apr-util-1.5.1.tar.gz -----apache可移植库</p><p>pcre-8.32.zip--------------正则表达式库</p><p>httpd-2.2.23.tar.gz--------Apache源码包</p><div style="page-break-after: always;"><span style="display: none;"><!--more-->& nbsp ;</span></div><p> </p><p>安装apr-1.4.6.tar.gz</p><p>#tar –zxvf apr-1.4.6.tar.gz</p><p>#cd apr-1.4.6</p><p>#./configure --prefix=/usr/local/apr</p><p>#make</p><p>#make install</p><p> </p><p>安装apr-util-1.5.1.tar.gz</p><p>#tar –zxvf apr-util-1.5.1.tar.gz</p><p>#cd apr-util-1.5.1</p><p>#./configure --prefix=/usr/local/aprutil --with-apr=/usr/local/apr</p><p>#make</p><p>#make install</p><p> </p><p>安装pcre-8.32.zip</p><p>#unzip pcre-8.32.zip</p><p>#cd pcre-8.32</p><p>#./configure –prefix=/usr/local/prce</p><p>#make</p><p>#make install</p><p> </p><p>安装apache</p><p># tar -zxvf httpd-2.2.23.tar.gz</p><p># cd httpd-2.2.23</p><p>#./configure --prefix=/usr/local/apache2.4.2 -with-apr=/usr/local/apr -with-apr-util=/usr/local/aprutil</p><p>#make</p><p>#make install</p><p>进去apache目录</p><p>#cd /usr/local/apache/bin</p><p>启动apache</p><p>#./apachectl start</p><p>查看端口</p><p>#netstat –an | grep 80</p><p>此时应该显示80端口正在监听中….</p><p>输入http://192.168.111.133看到It Work表明apache安装成功,如果不能看到,则执行iptables –F</p><p> </p><p>二、 安装mysql</p><p>安装mysql需要用到的文件</p><p>cmake-2.8.4.tar.gz</p><p>mysql-5.5.29.tar.gz</p><p> </p><p>安装cmake-2.8.4.tar.gz</p><p>#tar -zxvf cmake-2.8.4.tar.gz</p><p>#cd cmake-2.8.4</p><p>#./configure –prefix=/usr/local/cmake</p><p>#make</p><p>#make install</p><p> </p><p>安装mysql</p><p># tar -zxvf mysql-5.5.29.tar.gz</p><p># cd mysql-5.5.29</p><p>添加mysql运行的用户组和用户</p><p>#groupadd mysql</p><p>#useradd mysql</p><p>创建mysql安装目录</p><p>#mkdir /usr/local/mysql</p><p>#mkdir /usr/local/mysql/data</p><p>#cmake . <br />-DCMAKE_INSTALL_PREFIX=/usr/local/mysql <br />-DINSTALL_DATADIR=/usr/local/mysql/data <br />-DDEFAULT_CHARSET=utf8 <br />-DDEFAULT_COLLATION=utf8_general_ci <br />-DEXTRA_CHARSETS=all <br />-DENABLED_LOCAL_INFILE=1</p><p>如果上面的配置信息出错则安装</p><p># install ncurses-devel</p><p>#make</p><p>#make install</p><p>设置mysql目录用户组和用户</p><p># chown -R root:mysql . 用户组为root 用户root</p><p># chown -R mysql:mysql data</p><p>拷贝配置文件到etc目录下</p><p>#cp support-files/my-medium.cnf /etc/my.cnf</p><p>创建并初始化系统数据库的系统表</p><p># scripts/mysql_install_db --user=mysql</p><p>启动mysql</p><p># ./bin/mysqld_safe –user=mysql &</p><p>修改root密码</p><p>./bin/mysql –uroot –p</p><p>>use mysql</p><p>添加root用户的远程连接能力</p><p>Mysql>GRANT ALL PRIVILEGES ON . TO root@"%" IDENTIFIED BY "root";</p><p>Mysql>update user set Password = password(‘19930526’) where User='root';(19930526为需要设置的密码)</p><p>Mysql>flush privileges;</p><p> </p><p>三、 安装PHP</p><p>安装PHP需要用到的文件</p><p>libxml2-2.6.32.tar.gz</p><p>php-5.3.21.tar.gz</p><p> </p><p>安装libxml2-2.6.32.tar.gz</p><p>#tar –zxvf libxml2-2.6.32.tar.gz</p><p># ./configure --prefix=/usr/local/libxml2</p><p>#make</p><p>#make install</p><p>安装php</p><p>tar –zxvf php-5.3.21.tar.gz</p><p>配置信息</p><p>./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql</p><p>> --with-apxs2=/usr/local/apache/bin/apxs --with-libxml-dir=/usr/local/libxml2</p><p>#make</p><p>#make install</p><p>拷贝配置文件到/usr/local/php/lib目录下</p><p># cp php.ini-development /usr/local/php/lib/php.ini</p><p>配置Apache PHP 工作</p><p>配置 httpd.conf 让apache支持PHP</p><p># vi /usr/local/apache/conf/httpd.conf</p><p>找到 AddType application/x-gzip .gz .tgz 在其下添加如下内容</p><p>AddType application/x-httpd-php .php (.前面有空格)</p><p>AddType application/x-httpd-php-source .phps (.前面有空格)</p><p>重启apache</p><p>新建文件demo.php</p><p><?php</p><p> echo phpinfo();</p><p>?></p><p>将文件放到/usr/local/apache/htdocs下</p><p>看到打印信息页面则LAMP环境配置成功 …</p>