手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:cache

大蒜炒干丝

这个标题,并非是为了最近的“炒大蒜”而做的关键字,主要还是在QQ群中,一群人说到了大蒜,让我想起了伤心往事。
话说,那是2005年的冬天,我到北京公出,呆了一个月,有天晚上晚饭没吃饱,就买了点二锅头,想去小饭店买点菜下酒,结果,杯具的事情就让我一直到现在都记忆犹新。
兴冲冲的到饭店叫了一份“大蒜炒干丝”,然后厨师瞪着我看,说“大蒜炒干丝?”,我也很惊讶,这有什么 疑问的?他说没做过这种菜,我说没事你说吧。就拿大蒜和干丝炒一下就成了。
结果,到房间打开饭盒一下,一根根的干丝和大蒜头炒在了一起,怪不得厨师说没烧过,这种菜我也没吃过呀。。
于是刚才在群里,有人提及大蒜时,忍不住说起了这段伤心往事,然后问他们,大蒜炒干丝,炒肉丝,知道不?结果北京人还是说大蒜头,又郁闷了一会。
打开百度,google,搜到了这个菜。http://bbs.jiadinglife.cn/thread-393-1-1.html,还有http://bbs.jiangning.com.cn/viewthread.php?tid=247758
上图,NND
大小: 20.28 K
尺寸: 400 x 268
浏览: 1620 次
点击打开新窗口浏览全图
大小: 22.1 K
尺寸: 400 x 268
浏览: 1750 次
点击打开新窗口浏览全图
大小: 54.25 K
尺寸: 500 x 375
浏览: 1625 次
点击打开新窗口浏览全图
当我把图给北京的朋友看时,他说,这叫“青蒜”,这时候我才明白为什么我吃的是大蒜头了。南北地域文化差异实在是太大了。。。
果然杯具啊

Tags: 大蒜, 干丝, 北京

杯具:终于知道自己为什么会胖了

杯具啊,终于知道自己为什么会这么胖了,以前都不是特别了解,一直以为自己是缺乏锻炼啥的,但现在我才发现,原来还不止这一个原因,还有一个重要的原因就是。。。

春节的时候,家家户户都贴点门神,我们家也不例外的买了点贴一下,开始没注意,前几天的时候突然发现,原来这就是让我胖的原因,LOOK

大小: 314.27 K
尺寸: 500 x 332
浏览: 1498 次
点击打开新窗口浏览全图

一个福,一个发,多好的词啊,可是,反过来就成了“发福”。一下子傻掉了。

Tags: 发福, 门神

Got error 28 from storage engine 解决方法

今天一大早,把我的数据都tar了一遍,结果。。。mysql数据库就出现了“Got error 28 from storage engine”错误,去google搜索了一下,发现问题这样解决;
1、

XML/HTML代码
  1. 磁盘临时空间不够导致。  
  2. 解决办法:  
  3. 清空/tmp目录,或者修改my.cnf中的tmpdir参数,指向具有足够空间目录  

2、

XML/HTML代码
  1. mysql报以下错的解决方法  
  2. ERROR 1030 (HY000): Got error 28 from storage engine  
  3.   
  4. 出现此问题的原因:临时空间不够,无法执行此SQL语句  
  5. 解决方法:将tmpdir指向一个硬盘空间很大的目录即可  

当然两个说法都是一样。所以基本肯定是空间没有了。去其他磁盘看了一下,果然。。
郁闷了一下,把备份文件先删除了就正常了。
两个技巧来自:http://www.aslibra.com/blog/read.php/794.htm,感谢这个google搜索的头条帮我解决了这个问题

CSS的inherit与auto

CSS说简单吧。很简单,就那么些标签,说难吧,又很难,就那么些东西,你要折腾好,也不容易。
本文来自博客园,作者司徒正美(以前我就说过,看到这名字就想起车田正美)
内容如下:

一个很显浅的寓言,千年老树,电打雷劈,屹立不倒,却毁于蝼蚁的侵袭之下。自以为精通CSS的人,常常被一些小问题搞到头晕脑胀。通常是一个很小的 数值,经过层层放大歪曲后,整个布局就走形了。CSS是一门很简单的语言,易学易用,但也最容易出垃圾代码。这是没有深入研究这门语言所致。本人认 为,CSS是由以下三大块构成的:默认值,继承系统与加权系统。默认值,也就是浏览器在用户没有设置属性的情况下,默认指定的属性。CSS框架基本都有一 个叫reset.css 的文件,就是对其进行重设,消除各浏览器的差异的。继承系统就是下面要重点讨论的东西。加权系统,也就是优先级的问题,不在本文的讨论范畴,不说了。另,这三个东西都面临着IE Bug的侵袭,危害甚大,自己另行了断吧(笑)。

在CSS中,许多属性都是可以继承的,如某个段落的字体设置为白色,其元素的字体不用设置或设置为inhert,它就是白色。这些属性被称之为inherited property,它会从父元素获取对应属性的经过计算转换的值(computed value),如果父元素和它的情形一样,它就继续往上找,最后没有就使用浏览器的默认值。

下面是 inherited properties的一览表:

  • border-collapse
  • border-spacing
  • caption-side
  • color
  • cursor
  • direction
  • empty-cells
  • font
  • font-family
  • font-stretch
  • font-size
  • font-size-adjust
  • font-style
  • font-variant
  • font-weight
  • letter-spacing
  • line-height
  • list-style
  • opacity
  • list-style-image
  • list-style-type
  • quotes
  • text-align
  • text-indent
  • text-transform
  • white-space
  • word-spacing
XML/HTML代码
  1. <!doctype html>  
  2. <html dir="ltr" lang="zh-CN">  
  3.     <head>  
  4.         <meta charset="utf-8"/>  
  5.         <meta http-equiv="X-UA-Compatible" content="IE=8">  
  6.         <style type="text/css">  
  7.         </style>  
  8.         <script type="text/javascript">  
  9.             function getStyle(el, style){  
  10.                 if(!+"\v1"){  
  11.                     stylestyle = style.replace(/\-(\w)/g, function(all, letter){  
  12.                         return letter.toUpperCase();  
  13.                     });  
  14.                     return el.currentStyle[style];  
  15.                 }else{  
  16.                     return document.defaultView.getComputedStyle(el, null).getPropertyValue(style)  
  17.                 }  
  18.             }  
  19.             var _ = function(id){  
  20.                 return document.getElementById(id);  
  21.             };  
  22.             window.onload = function(){  
  23.                alert(getStyle(_("text2"),"color"))  
  24.             }  
  25.         </script>  
  26.   
  27.         <title>CSS</title>  
  28.     </head>  
  29.     <body>  
  30.         <div id ="text" style="width:20em;height:140px;background:#8080c0;padding:2px;border:1px solid red;color:#fff">父元素  
  31.             <div id="text2" style="width:80%;height:4em;background:#b45b3e">子元素</div>  
  32.         </div>  
  33.     </body>  
  34. </html>  

 

我们给父元素设置了字体的样式,没有设置子元素的,当取出子元素的时,发现其值转换为rgb格式(当然IE除外啦!)

不过,在IE7及其之前的版本,是不支持用inhert来设置direction与visibility以外的样式属性。具体可参见这里这里

在IE8中,原本是inherited property的text-align在th中失效。

XML/HTML代码
  1. <table>  
  2.   <tr>  
  3.     <th>Ruby</th>  
  4.     <th>Rouvre</th>  
  5.   </tr>  
  6.   <tr>  
  7.     <td>By</td>  
  8.     <td>司徒正美</td>  
  9.   </tr>  
  10. </table>  
  11. table, tr, td, th {  
  12.   border-collapse: collapse;  
  13.   border: 1px solid #000;  
  14. }  
  15. table {  
  16.   text-align: right;  
  17. }  
  18. td, th {  
  19.   width: 100px;  
  20. }  

本来th应该会从table中继承文本向右对齐的设置,但失效了……

XML/HTML代码
  1. <!doctype html>  
  2. <html dir="ltr" lang="zh-CN">  
  3.     <head>  
  4.         <meta charset="utf-8"/>  
  5.         <meta http-equiv="X-UA-Compatible" content="IE=8">  
  6.         <style type="text/css">  
  7.             table, tr, td, th {  
  8.                 border-collapse: collapse;  
  9.                 border: 1px solid #000;  
  10.             }  
  11.             table {  
  12.                 text-align: right;  
  13.             }  
  14.             td, th {  
  15.                 width: 100px;  
  16.             }  
  17.         </style>  
  18.         <title>CSS</title>  
  19.     </head>  
  20.     <body>  
  21.         <table>  
  22.             <tr>  
  23.                 <th>Ruby</th>  
  24.                 <th>Rouvre</th>  
  25.             </tr>  
  26.             <tr>  
  27.                 <td>By</td>  
  28.                 <td>司徒正美</td>  
  29.             </tr>  
  30.         </table>  
  31.     </body>  
  32. </html>  

解决IE8这个弱智Bug也很容易,就是显式地设置inhert。

XML/HTML代码
  1. table, tr, td, th {  
  2.   border-collapse: collapse;  
  3.   border: 1px solid #000;  
  4. }  
  5. table {  
  6.   text-align: right;  
  7. }  
  8. td, th {  
  9.   width: 100px;  
  10. }  
  11. th {  
  12.   text-align: inherit;  
  13. }  

详细代码

XML/HTML代码
  1. <!doctype html>  
  2. <html dir="ltr" lang="zh-CN">  
  3.     <head>  
  4.         <meta charset="utf-8"/>  
  5.         <meta http-equiv="X-UA-Compatible" content="IE=8">  
  6.         <style type="text/css">  
  7.             table, tr, td, th {  
  8.                 border-collapse: collapse;  
  9.                 border: 1px solid #000;  
  10.             }  
  11.             table {  
  12.                 text-align: right;  
  13.             }  
  14.             td, th {  
  15.                 width: 100px;  
  16.             }  
  17.             th {  
  18.                text-align: inherit;  
  19.             }  
  20.         </style>  
  21.         <title>CSS</title>  
  22.     </head>  
  23.     <body>  
  24.         <table>  
  25.             <tr>  
  26.                 <th>Ruby</th>  
  27.                 <th>Rouvre</th>  
  28.             </tr>  
  29.             <tr>  
  30.                 <td>By</td>  
  31.                 <td>司徒正美</td>  
  32.             </tr>  
  33.         </table>  
  34.     </body>  
  35. </html>  

 

此外还有一些CSS属性是不能继承的,最经典如border系列。它被称之为non-inherited property,如果我们不为它设置,我们只能取得浏览器的默认值,默认值在火狐中被称之为 initial value 。一个相关的好消息是,默认值在火狐也可以指定了,这样我们就不用reset样式了!

下面是non-inherited property的一览表:

  • background
  • border
  • bottom
  • clear
  • display
  • float
  • height
  • left
  • margin
  • outline
  • overflow
  • padding
  • position
  • right
  • top
  • visibility
  • width
  • z-index
XML/HTML代码
  1. <!doctype html>  
  2. <html dir="ltr" lang="zh-CN">  
  3.     <head>  
  4.         <meta charset="utf-8"/>  
  5.         <meta http-equiv="X-UA-Compatible" content="IE=8">  
  6.         <style type="text/css">  
  7.         </style>  
  8.         <script type="text/javascript">  
  9.             function getStyle(el, style){  
  10.                 if(!+"\v1"){  
  11.                     stylestyle = style.replace(/\-(\w)/g, function(all, letter){  
  12.                         return letter.toUpperCase();  
  13.                     });  
  14.                     return el.currentStyle[style];  
  15.                 }else{  
  16.                     return document.defaultView.getComputedStyle(el, null).getPropertyValue(style)  
  17.                 }  
  18.             }  
  19.             var _ = function(id){  
  20.                 return document.getElementById(id);  
  21.             };  
  22.             window.onload = function(){  
  23.                alert(getStyle(_("text2"),"background-color"))  
  24.             }  
  25.         </script>  
  26.   
  27.         <title>CSS</title>  
  28.     </head>  
  29.     <body>  
  30.         <div id ="text" style="width:20em;height:140px;background:#8080c0;padding:2px;border:1px solid red;color:#fff">父元素  
  31.             <div id="text2" style="width:80%;height:4em;color:#b45b3e">子元素</div>  
  32.         </div>  
  33.     </body>  
  34. </html>  

 

我们给父元素设置了背景颜色,没有设置子元素的,这时会取得浏览器的默认值transparent(W3C那一方好像只要是颜色都会转换为rgb格式,多出的a为Alpha)

http://monc.se/kitchen/38/cascading-order-and-inheritance-in-css http://elizabethcastro.com/html/extras/cssref.html

接着我们来看auto,这是一个含糊不清但是有长度概念的值。应用于以下属性:

  • overflow
  • cursor
  • height
  • width
  • marker-offset
  • margin
  • margin-* (left|bottom|top|right|start|end)
  • top
  • bottom
  • left
  • right
  • table-layout
  • z-index
  • -moz-column-width
  • languages

在块级元素的可度量的属性中(如width,height),如果不设置值,其默认值是auto,但它很容易会被父级元素的值覆盖,也就是隐式地成 为了inhert了。在内联元素中,由于不具备盒子模型,如果不设置,就算是火狐也原本奉还它,这对于精确计算元素的宽度与高度是非常不利的。auto还 有对称性,这个在居中布局我们常常运用到它。在非度量的属性中,如overflow,就要具体情况具体分析了。

推荐一款插件:ScribeFire

这款插件的用途是可以让你快速发表博客。功能还算是挺强大。主要是方便啦

而且,它是firefox的插件,不需要你安装软件,有firefox的地方就能够使用,多方便啊。。。

当然,在使用它为wordpress发表文章的时候,还必须在后台开启XML-RPC应用。否则是不能发表的。

博客系统看来是需要更换了,sablog用了也将近2年了。最痛苦的就是输入的文章突然消失(不小心按了Backspace键,然后回来的时候内容就没有了),出现了好几次这样的事故。。

下载地址为:https://addons.mozilla.org/en-US/firefox/addon/1730

截图:大小: 24.52 K
尺寸: 200 x 119
浏览: 2406 次
点击打开新窗口浏览全图

Tags: 插件, firefox, scribefire, wordpress, blog

Records:712