Page1 of 221 2 3 ... 22
2 09 2010

常用的MySQL数据类型

#bigCat.DataBase(" Comment.isBlank ")

本文转自让理想飞起来
感谢作者的汇总:)

===
最常用的MySQL数据类型是VARCHAR, DECIMAL, DATE, INT, TEXT 和 TIMESTAMP。

第一个:

VARCHAR通常用来表示最多为255个字符的变量长度字符串。如果你要储存和处理字母数字类的数据,这种数据类型是最合适的。适用于这类数据的典型例 子包括人名,邮政编码,电话号码和不超过255个字符长度的任意字母数字组合。那些要用来计算的数字不要用VARCHAR类型保存,因为可能会导致一些与 计算相关的问题。换句话说,可能影响到计算的准确性和完整性。

第二个:

DECIMAL最适合保存那些将被用于计算的数据。在MySQL中,我们可以指定保存一些正当的数字。还可以指定是否允许存在负值。

指定DECIMAL类型的长度会有些棘手。例如,如果你需要在小数点前面保存五位数,且小数点后只保留三位,那么在数据库中其适当的长度将 是:Decimal(5+3,3)或 Decimal(8,3),可以使用的数据包括:12345.678,56872.690,11.6和12.568等。而这些数字则会引发出错信 息:128781.1,8972865.231。

第三个:

建议用DATE数据类型来保存日期。MySQL中默认的日期格式是yyyy-mm-dd。

第四个:

INT数据类型可以用来保存那些不包含小数点的数字。INT代表整数。
有些整数类型以及他们最多所能拥有的数字位我们必须有所了解:

·TINYINT——这个类型最多可容纳三位数。
·SMALLINT——最多可容纳五位数。
·MEDIUMINT——最多可容纳八位数。
·INT——可以容纳十位数。
·BIGINT——最多可容纳二十位数。

第五个:

TEXT可以接受文本输入,VARCHAR只能接受255个字符,但是TEXT可以用来存储超量的数据。

第六个:

当TIMESTAMP数据类型被选定,可以点击“CURRENT_TIMESTAMP”作为默认,MySQL会自动返回每个MySQL数据插入的确切时间。

===

下面是一些推荐的数据库设计规格:
1. 第一个数值域:

要收集的数据:客户姓名
推荐域名:customername
MySQL数据类型:VARCHAR
允许的客户名最大长度:64

2. 第二个数值域:

要收集的数据:价格
推荐域名:price
MySQL数据类型:DECIMAL
小数点前最多允许位数:4
小数点后保留到3位
最终的小数位长度:DECIMAL(4+3, 3) 或者 DECIMAL(7, 3)
不允许出现负值

3. 第三个数值域:

要收集的数据:购买日期
推荐域名:datepurchased
MySQL数据类型:DATE
最大长度:不可用

4. 第四个数值域:

要收集的数据:产品序列号
推荐域名:productkey
MySQL数据类型:SMALLINT
该变量的最大长度:5
其他属性:少于5时用0填补,不允许出现负值

5. 第五个数值域:

要收集的数据:投诉细则
推荐域名:complaintdetails
MySQL数据类型:TEXT
最大字符长度:取决于用户的输入情况

6. 第六个数值域:

要收集的数据:投诉受理日期
推荐域名:reveivingdate
MySQL数据类型:TIMESTAMP
其他属性:为Current_Timestamp设置默认值,这样它便可以记录投诉的确切时间。
===

31 08 2010

ubuntu 10.04 networking disabled 网络已禁用

#bigCat.Linux(" Comment.isBlank ")

after suspend.... 休眠后就傻逼了



sudo service network-manager stop
sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo service network-manager start

bug..... shit

30 08 2010

-ms-interpolation-mode Attribute | msInterpolationMode Property

#bigCat.CSS(" Comment.isBlank ")

http://msdn.microsoft.com/en-us/library/ms530822%28VS.85%29.aspx

Sets or retrieves the interpolation (resampling) method used to stretch images.

Syntax

HTML { -ms-interpolation-mode : sMode }
Scripting [ sMode = ] object.style.msInterpolationMode [ = v ]

Possible Values

sMode String that specifies or receives one of the following values.
nearest-neighbor
Always use nearest neighbor interpolation mode.
bicubic
Always use high-quality bicubic interpolation mode.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has no default value. The Microsoft Cascading Style Sheets (CSS) extension is not inherited.

Remarks

msInterpolationMode was introduced in Windows Internet Explorer 7.

The msInterpolationMode property applies to stretched images only. For example, if the natural width of the image is 200x200 but the page designer specifies that the height and width should be 400x400, then the image will be stretched to the new dimensions using the nearest-neighbor algorithm, unless otherwise specified.

If the zoom level of the page is 100%, the default interpolation is nearest-neighbor, otherwise bicubic mode is used.

Example

The following example applies the -ms-interpolation-mode attribute to determine the resampling algorithm of stretched images. The sample requires Internet Explorer 7 or later to view.

<html>
<head>
<style>
img.highqual { -ms-interpolation-mode:bicubic }
img.nearestn { -ms-interpolation-mode:nearest-neighbor }
</style>
</head>
<body>
<img src="sphere.jpg" width="175" height="350">
<img src="sphere.jpg" width="175" height="350">
<img src="sphere.jpg" width="175" height="350">
<p>Change the zoom level of the page to see the difference.</p>
</body>
</html>

This feature requires Windows Internet Explorer 7 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

This property is a Microsoft extension to Cascading Style Sheets (CSS) World Wide Web link.

Applies To

currentStyle, IMG, runtimeStyle, style, CSSCurrentStyleDeclaration Constructor, CSSRuleStyleDeclaration Constructor, CSSStyleDeclaration Constructor
29 08 2010

Chromium-extensions popup onunload or onbeforeunload

#bigCat.beatWife(" Comment.isBlank ")

http://groups.google.com/a/chromium.org/group/chromium-extensions/browse_thread/thread/cc6673d8e47a9bf4/06b9ab24ff5ac7e5?pli=1

Antony Sargent
View profile
More options Apr 7, 5:55 am
Actually for your case, there are two approaches you might take:
1) Use the messaging APIs to set up a Port between the popup and background
page. You then should get a onDisconnect event in the background page when
the popup goes away.
2) Have the background dispatch events using chrome.extension.getViews() -
if there is a popup in the list, you use the DOMWindow handle to call a
function in the popup directly.

29 08 2010

[Chrome plugin] beatWife FAQ

#bigCat.beatWife(" Comment.isBlank ")

Download: https://chrome.google.com/extensions/detail/cgoebjgkiiapifcpclljbdbmmodmmdff

don't have any questions yet~

涉及技术
hello world
localStorage
AJAX
-webkit-animation

chrome.browserAction.setIcon() 更换图标

logs

v1 抽脸 计数(bug)

v1.1 屏蔽计数 明早再看

v2 add popup and big button

vX 增加可持续抽老婆的乐趣,慢慢搞

Page1 of 221 2 3 ... 22
Host: (miao) | Word: Press | Code: bigCat | Valid: HTML5