一个非常简单的小问题,由于我们没有经验,往往搞得焦头烂额。而在已经经历过的人的口里,也许就是几个字的工夫。所以,不要对提问的朋友的不起眼的小问题哧之以鼻。
我们提倡钻研精神,更提倡互助和共享的精神。
你有两个苹果,我有两个梨,我们互相交换一下,两个人都吃到了苹果和梨。
凡事多检查自己
我们总喜欢站在自己的角度思考问题,争执问题。这就是矛盾的源泉。
这几天,家庭环境很不顺心,今天又跟家人争吵,一气之下,不到上班时间就跑到单位上来了。
静下心来想想,凡事要多检查自己,自己检查完了,再去检查对方。我想,只有这样,才是解决问题的办法。
学习日记精神,开发小组精神
学习日记精神:
1、学习到永远;
2、不怕犯错,不怕面对错,不怕改错;
开发小组精神:
1、做好每一个小事和细节;
2、团结就是力量;
3、乐于其中;
4、勇于提交代码;
5、快速提交,快速迭代;
6、小增量,密集版本发布;
mysql从4.11开始支持子查询(转帖)
我用的mysql4.0.14,试验可以在插入语句中使用子查询,如:
insert into learndiary_login.user
(SELECT userID,userName,psd,email
FROM websitedb.user
where userid<30)
但是其它的子查询不行:
select * from
(select userID*2 AS u1,userName as u2,
psd as u3,email as u4) as t
where u1>50
下面的文章说mysql从4.11开始支持子查询,正文如下:
关于MySQL嵌套查询的技巧 [ 2005-10-11 14:57:12 | 5iuu ]
许多人都觉得MySQL不支持嵌套查询,其实MySQl从4.11版后已经完全支持嵌套查询了,那么下面我举些简单的嵌套查询的例子吧(源程序来自MySQL User Manual):
1. SELECT语句的子查询:
语法: SELECT ... FROM (subquery) AS name ...
先创建一个表:
CREATE TABLE t1 (s1 INT, s2 CHAR(5), s3 FLOAT);
INSERT INTO t1 VALUES (1,'1',1.0);
INSERT INTO t1 VALUES (2,'2',2.0);
我们就可以进行以下的嵌套查询了:
SELECT sb1,sb2,sb3
FROM (SELECT s1 AS sb1, s2 AS sb2, s3*2 AS sb3 FROM t1) AS sb
WHERE sb1 > 1;
结果是: 2, '2', 4.0.
我们知道下面语句是不会得到正确结果的,因为对经过Group by排序的集合进行求均值是不能得到正确答案的:
SELECT AVG(SUM(column1)) FROM t1 GROUP BY column1
所以我们可以通过下面的嵌套查询实现同样的效果:
SELECT AVG(sum_column1)
FROM (SELECT SUM(column1) AS sum_column1
FROM t1 GROUP BY column1) AS t1;
2.行的子查询(Row Subquery):
看下面的例子:
SELECT * FROM t1 WHERE ROW(1,2) = (SELECT column1, column2 FROM t2);
这个查询是返回column1等于column2的结果行。Row函数中的1和2相当于构造参数。想必Blogjava上的同志对这些应该比较清楚,也不去详细介绍了。
3.使用Exist和Not Exist参数
这里的Exist和Not Exist用途及用法和在其他没有什么大的区别,我就简单举几个范例好了:
范例一: SELECT DISTINCT store_type FROM Stores
WHERE EXISTS (SELECT * FROM Cities_Stores
WHERE Cities_Stores.store_type = Stores.store_type);
范例二: SELECT DISTINCT store_type FROM Stores
WHERE NOT EXISTS (SELECT * FROM Cities_Stores
WHERE Cities_Stores.store_type = Stores.store_type);
范例三: 这个例子中嵌套使用了Not Exist语法,稍微注意一下:
SELECT DISTINCT store_type FROM Stores S1
WHERE NOT EXISTS (
SELECT * FROM Cities WHERE NOT EXISTS (
SELECT * FROM Cities_Stores
WHERE Cities_Stores.city = Cities.city
AND Cities_Stores.store_type = Stores.store_type));
4.条件关联关系查询:
解释起来麻烦,直接看例子吧:
SELECT column1 FROM t1 AS x
WHERE x.column1 = (SELECT column1 FROM t2 AS x
WHERE x.column1 = (SELECT column1 FROM t3
WHERE x.column2 = t3.column1));
跟其他数据库做法是一样的。
5.其他使用方法和注意:
除了上面这些还有很多很多,不过就不去细讲了,因为这些跟别的数据库差不多,只是为了给大家一个参考,提提就够了。
SELECT (SELECT s1 FROM t2) FROM t1;
SELECT (SELECT s2 FROM t1);
支持子查询的语法有:SELECT,INSERT,UPDATE,DELETE,SET和DO。
子查询可以使用任何普通查询中使用的关键词:如DINSTINCT,GROUP BY,LIMIT,ORDER BY,UNION,ALL,UNION ALL等。可以使用<,>, <=, >=, =, <>运算符进行比较,也可以使用ANY ,IN和SOME进行集合的匹配。
Tags:MySQL相关日志: JSP连接mysql数据库攻略 [2005-10-21 PM | 日积月累]
引用通告地址 (0):[本站声明:此文章来源于网络,如果未属名,可能此文被转摘多次,原作者不详,如果您认为侵权,请联系我。我将在第一时间按要求做出处理,并消除影响。][字体大小:大 中 小] [ 收藏此页到 365KEY | 博采 | 人人网摘 ]
http://www.GuoBlog.com/trackback.asp?tbID=694
http://www.GuoBlog.com/trackback.asp?tbID=694&CP=GBK
(转帖)UML中聚集(Aggregation)与组合(Composition)的区别
UML中聚集(Aggregation)与组合(Composition)的区别
Posted on 2005-04-20 20:03 黄金狮子旗下 阅读(1199) 评论(8) 编辑 收藏 收藏至365Key 所属分类: UML设计
书上是这样描述的:聚集是关联中的一种,聚集对象由部分对象组成;组合又是一种特殊的聚集。在一个组合对象中,部分对象只能作为组成对象的一部分与组合对象同时存在。
即是说,组合是“当聚集对象和它的组成对象之间是具有强关联的一种特殊聚集”,组合对象的关键特征是部分对象只能存在于组合对象之中,并且部分体的寿命可能比组合体短,但组合体消亡,部分体也必然消亡。
我们举例来说明:
聚集
电脑可以由显示器、CPU、主板、硬盘、键盘、鼠标等聚集而成。在这种关系里面,各个组成部分是可以分拆开独立存在的。
组合
衬衣是由主体、衣领、袖口、衣袖、钮扣等组合而成。在这种关系里面,衣袖或者衣领等如果拆分开来并不能算是一个独立的主体,不具有价值了。
树是由树干、树根、树枝、树叶等组合而成的。这里面树叶可以先于树消亡,但如果树被砍掉,那么树叶也没有存在价值了。
多数参考资料上都是上面叙述的那样解释的,不过我觉得理解起来还是有些难度:电脑我把他砸了,电脑坏了,那你说各个组成部分到底是一起消亡了还是没消亡呢?也许应该说至少没有被砸坏的部分还是可以独立使用的;可若这样说的话,那我衬衣破了个洞,我要把衬衣裁减为各个部分,那其他部分是不是也可以拿去拼装为新的衣服?
所以,后来我自己是这样理解的,不知道对不对,大家可以给我指正:同类的几个聚集对象里面的组成对象是可以互换的(比如电脑里面的配件);而同类的几个组合对象里面的组成对象是不能够互换的(正所谓强关联嘛,所以这件衬衣的袖口换到另一件上面不科学;这棵树的叶子也没法装到另一棵树上面去)。
Feedback
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-04-20 21:03 by idior
这个概念一向分的不是很清楚。 很多大家也争论过 , 没什么结果。
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-04-20 21:46 by neuhawk
好像去年高程考这个!
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-04-20 22:06 by 生活、工作
这样理解好像也不大对吧。
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-04-21 00:37 by 常建昭
我觉的这样理解是错的。。。
把电脑砸了(呵呵,想法不错。),你的主板,CPU等还是独立的。。你不能把那些概念给想成物理上的消失,我认为那是种抽象的概念。。你可以把你举的树的例子引用进来,你把电脑砸了,零件还是有用的。。你砸的目标是电脑,而非个别零件。。
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-04-21 08:48 by 黄金狮子旗下
to 常建昭:
你说的是,我就是觉得那部分比较容易混淆,所以故意写成那样的。我真正的理解是下面最后一段嘛。
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-04-21 12:38 by 安琪儿
按照我的理解,上面举的两例似乎都应属于组合。
组合是强关联的聚集,电脑配件从一台电脑中分离出来后,仍然需要进行再次组装才能发挥作用。也可以这样理解组合,它是对所有部件的整合,相互依赖。即便此组合内部分割开来,若要有效,仍然会出现类似的彼组合。
再举个单纯的聚集的例子,一个班级有许多个独立的个体,当班级不存在时,个体仍能单独发挥个人作用。此时整体和部分就不遵从相互依赖的规则,是一种弱关联。
总之,聚集和组合主要体现在关联强度上的不同。
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-04-22 01:08 by 吴正杰
UML宝典上面说明: 生命周期不同
组合在聚集中用来说明部件的生存周期取决于整体即集合的生存周期。
# re: UML中聚集(Aggregation)与组合(Composition)的区别
2005-05-04 15:58 by 无名
感觉这里边有一个应用环境的问题,就目前看,人的器官和人体之间是组合关系,那时因为器官移植技术还不够发达,如果将来器官移植技术发展了,器官和人体之间可能就成为组合关系了。
Struts下配置log4j的方法(转帖2篇)
第一篇:转自:http://tech.eyeah.cn/3116/1113/1137/234119733.html
Log4J配置完后,tomcat5启动如此报错。
作 者:程序员(onebelief)
时 间:2005-02-26 12:30:08
log4j:WARN No appenders could be found for logge(org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.
讨教,讨教。
回复人:程序员(onebelief)2005-2-26 13:06:52
没有人知道么!?
回复人: throw new LowSalaryException(me) (kaymo)2005-2-26 14:08:36
一个包,2个配置文件
回复人:程序员(onebelief)2005-2-26 14:14:48
能说详细点儿么!?我是在架struts应用时出现的这个问题。
struts中的log4j怎么初始化!?
谢谢,请教完马上可以给分!
回复人:西门疯雪(bon_jovi)2005-2-26 14:30:51
log4j.jar和commons-logging.jar放到你的web应用底下的lib中。
在classes下建立两个配置文件commons-logging.properties和log4j.properties
commons-logging.properties里就一行,org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JCategoryLog说明用的是log4j。
启动tomcat就可以了。
你的类里面写日志都是调用的apache的接口,以后换其他日志系统也方便。
回复人:程序员(onebelief)2005-2-26 14:33:18
非常感谢
第二篇:转自:http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=121&threadID=4267&tstart=450
回复: 5 页数: 1
gyokuho [普通用户]
发帖数: 9
活跃积分: 11
技术积分: 0
可用币值: 11
注册时间: 2002-9-4
用户状态:正常
请教:Weblogic/Struts/Log4J 环境下,log destination(appender) 配置问题
提交时间: Jun 9, 2003 2:04:03 AM 引用 回复 发消息
我用 Weblogic 7.0, Struts 1.1, commons-logging.properties 中只有一句:
org.apache.commons.logging.Log=
org.apache.commons.logging.impl.Log4JLog
这样,输出到确省的 System.err去了。怎样配置才能指定输出到一个log文件?
查资料后,好像有:
1, -Dlog4j.configuration=Log4JLog.properties
2, 然后在 Log4JLog.properties 中写一些key=value。
什么的,在我的环境中试验后没有成功。请问具体需要怎样做才解决问题?
此文被gyokuho在2003/06/09 16:14:48修改!
--------------------------------------------------------------------------------
bea_ora [普通用户]
发帖数: 222
活跃积分: 225
技术积分: 3
可用币值: 240
注册时间: 2003-3-26
用户状态:正常
Re:请教:Weblogic/Struts/Log4J 环境下,log destination(appender) 配置问题
提交时间: Jun 10, 2003 4:26:47 AM 引用 回复 发消息
log4j里面有一个
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log
log4j.appender.R.MaxFileSize=100KB
可以把log写到里面,具体的
你查一下log4j API 和
http://www.jfsys.com/main/service/service_log4j.htm
资料吧
此文被bea_ora在2003/06/09 20:31:02修改!
--------------------------------------------------------------------------------
gyokuho [普通用户]
发帖数: 9
活跃积分: 11
技术积分: 0
可用币值: 11
注册时间: 2002-9-4
用户状态:正常
Re:请教:Weblogic/Struts/Log4J 环境下,log destination(appender) 配置问题
提交时间: Jun 11, 2003 4:30:25 AM 引用 回复 发消息
多谢回复。
我在Log4j 的主页上也看到了这样的例子,但是自己试了几次,没有成功。
我不知道那些个设置应该放在哪个properties文件中,这个properties 文件
又应该放在什么位置。
希望做成功的同志给与指导。
--------------------------------------------------------------------------------
xutong [普通用户]
发帖数: 16
活跃积分: 15
技术积分: 1
可用币值: 10
注册时间: 2004-6-11
用户状态:正常
Re: 请教:Weblogic/Struts/Log4J 环境下,log destination(appender) 配置问题
提交时间: Oct 25, 2005 4:01:05 PM 引用 回复 发消息
../WEB-INF/class
--------------------------------------------------------------------------------
fengw [普通用户]
发帖数: 692
活跃积分: 695
技术积分: 60
可用币值: 590
注册时间: 2003-7-18
用户状态:正常
Re: 请教:Weblogic/Struts/Log4J 环境下,log destination(appender) 配置问题
提交时间: Oct 25, 2005 4:47:14 PM 引用 回复 发消息
需要在类路径下添加 log4j.properties文件。
下面是文件的内容,这个我就简单写了点,需要扩展的话查文档
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=debug,stdout
log4j.logger.com=warn,stdout
--------------------------------------------------------------------------------
让开,让开~~~~~~~
╭══╮
╭╯ΘΘ║
╰⊙═⊙╯。oо○-俺的灌水车来了!!
ttoc [普通用户]
发帖数: 58
活跃积分: 57
技术积分: 0
可用币值: 57
注册时间: 2005-8-27
用户状态:正常
Re: 请教:Weblogic/Struts/Log4J 环境下,log destination(appender) 配置问题
提交时间: Oct 25, 2005 4:55:36 PM 引用 回复 发消息
log4j.rootLogger=INFO,stdout,file
log4j.logger.com.common.utility.MailSend=ERROR,A1
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %r [%t] %5p [%F:%L] - %m%n
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=c:/aaa.txt
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %r [%t] %5p [%F:%L] - %m%n
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d %r [%t] %5p [%F:%L] - %m%n
log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=c:\comics.log
#log4j.appender.rolling.File=/usr/local/tomcat/logs/comics.log
log4j.appender.rolling.MaxFileSize=5120KB
log4j.appender.rolling.MaxBackupIndex=10
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.File=c:\mail.log
#log4j.appender.A1.File=/usr/local/tomcat/logs/comics.log
log4j.appender.A1.MaxFileSize=500KB
log4j.appender.A1.MaxBackupIndex=50
log4j.appender.A1.Append=true
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} - [%p] [%C{1}] - %m%n
一种知识交换的市场经济模式(幸福校园)
今天,我想找一下struts下配置log4j的资料,结果发现一篇文章好像很好:(http://www.happycampus.com.cn/pages/2005/02/11/D160170.html)[计算机应用] Struts技术研究--Exception&Logging
好不容易注了册,不过要人民币,没看成:(
是一家韩国公司(http://www.agentsoft.co.kr/english/index.hcam)在经营,到他们主页需要下载韩文字体。http://www.happycampus.com.cn/。
知识需要用钱去买,明码实价。我找到一篇论文,要求15HP,不知道折合人民币多少。花了10分钟注册,结果我注册后只有3HP,要求充值,人民币,至少10元,默认20元,银行汇款、网上支付。。。。
对于习惯了在网上免费获取知识的我,真不适应。
不过,这也算是一个知识共享的方式吧。
好像他们做得还很成功。可以作为一种模式记在这里。
开发的路线不要走偏了
现在的主要目标是解决学习网站已经知道的重大缺陷,这两天却做着做着去做试点技术了。想实践一种基于测试的结对编程模式。当然,实践是可以继续下去的,但前提是现有开发任务不能受大的影响。
所以,在测试代码未作的情况下,是不是可以先把功能性的代码写完。
也许,先进的不一定是适合于我们的。如果没有条件和必要,再丢掉我们的主要目标,可能是错误的选择。
怎么办?
可以这样办,测试代码是要试验的,不过好钢用在刀刃上,只在最需要测试的类才为其写单独的StrutsTestCase或Junit测试类。
这也是一个折衷的办法吧。
我们要在现实和理想中取得平衡,以实现我们的既定目标为准绳。
(转帖)网页色彩、图形的使用(Coloring Your World)
转自:http://www.cntesting.com/bbs/read.php?tid=1343&page=e#a
Coloring Your World
Robert Hess
Microsoft Corporation
July 10, 2000
Contents
Background Check
Graphic Formats
Applying Palettes
Image and color have had a long history on Web pages. But based on some of the questions that people send to me, as well as some of the results I see on far too many professionally designed Web pages, it seems to me that a lot of folks are still confused as to the technical aspects of how to use images and/or color on their pages. So, excuse me if the following is old news to some of you; I expect many people will find the following information useful.
Background Check
First, let me address what must be the simplest aspect of color usage, and possibly one of the most common problems present on many Web sites. When I say simple, I really mean simple. Here it is:
<body bgcolor="white">
Are you using this on your site? Are you sure? Take a moment to check your browser's default background color setting. If you are like the majority of computer users, you have your default background color set to white. Now, imagine what happens if—as you design Web pages—you constantly see them with a white background, even if you haven't specifically set the background to white. Now imagine that you add some graphics, or other page elements to your site. If you aren't intentionally checking to verify that these will still look fine on any background color, you should be sure to manually set your page's background color, because chances are that your carefully designed Web page won't look quite right if some color besides white comes in for the background.
<body>
</body> <body bgcolor="white">
</body>
Figure 1. The use of transparency in the lefthand image renders the accompanying text virtually unreadable. Also, the shadow around both the fly and the text looks jagged, because it was designed to be used on a white background. In the righthand image, the BGCOLOR attribute was explicitly set to white, so the image shows up as the designer intended.
I have my Web browser set to gray as the default background color, and you would be amazed by the number of sites I run across that weren't expecting to suddenly get a gray background. You would be equally surprised to see who owns some of these sites. Check it out. Change your default background color to something other than white, then browse the Web—starting with your own site.
Graphic Formats
Another fairly simple design issue, but one that I constantly see people struggling with, is the difference between .gif and .jpeg images. The specific issue is which format to use when you prepare images for your Web site.
The simple rule of thumb is that .jpeg images are best used for photographic (also known as "continuous tone") images, and the .gif format is best for images that have large areas of solid color. The reason for this lies in the process these formats use for their compression.
Figure 2. This 4K JPEG image would be 11K if saved as a GIF
Figure 3. This 2K GIF image would be 4K if saved as a JPEG
A .gif is a "lossless" compression model. This means that if you take an uncompressed bitmap image, compress it into a .gif file, then uncompress it back into a bitmap image, you will end up with the identical image. No bits are lost. However, if you were to convert this bitmap to a .jpeg, then bring it back to a bitmap, you would almost certainly lose data—and the tighter the compression, the more data you would lose. The algorithm that .gif uses for image compression works really well when you have a large area of a single color—but it will actually increase the size of the image if every pixel is a different color than the preceding one.
Figure 4. Zooming in on the above GIF image saved as a JPEG
Figure 5. Zooming in on the above GIF image
The only time you might need to use the .gif format for what otherwise might be best implemented as a .jpeg image is when you need transparency in your image. Graphic images are rectangular in form, but the .gif image format supports the notion of treating one of your image colors as trasparent, so that whatever image or color is underneath the image will show through. This is extremely handy for situations in which you want a non-rectangular image on your page. You can see this effect in the above "A Fly in the Ointment" example. The image of the fly and the shadowing are best done in a .jpeg image—but because I wanted to use transparency, I had to turn the image into a .gif.
Okay, there is one other time you would want to turn a .jpeg image into a .gif—when you want animation in your image. The .gif file format supports multiple images in a single file, and Web browsers have leveraged this to allow a .gif file to represent simple animation. However, I highly caution against using this too often.
Applying Palettes
When discussing the usage of .gif and .jpeg images, it is also important to touch upon the aspect of color palettes. A color palette is the definition of colors you will use for your image. The palette is placed and is then referenced by the appropriate color index within the image definition itself. This can allow the image data to be a lot smaller than it would be otherwise, but it also limits the numbers of colors you can use.
For example, let's pretend you had a 640x480 image that uses only 256 colors. If each pixel of the image is stored as a full, 24-bit color value (24 bits is the data storage required for a color value, such as "#99F5A2"), you end up with an image file that is about one megabyte in size. However, if you instead build a 256-entry color palette for each of those 24 bit colors— then, within your image file, use only 8-bit values (8 bits is the data storage required for an index value capable of referencing 256 different locations in a table) to indicate which of those 256 colors you want to use for your image, you end up with an image that is about one third the size. (Note that these calculations are on raw pixel images for discussion purposes only; an actual .gif or .jpeg image with these characteristics would be of considerably different size.)
Understanding the notion of palettes is important, because a .gif image uses palettes for its image definition, but .jpeg does not. This means that a .gif image can contain no more than 256 unique colors, while a .jpeg can contain virtually any color that can be described by a 24-bit value (more than 16 million colors). Most image-editing tools will allow you to customize/optimize the palette used by a .gif image, so that the colors in its palette will be those 256 colors that the image needs. A potential problem arises, however, when users set their display to 256-color mode. In that case, both the image and the display are using a color palette for showing images on the screen—and if an image wants to use a color that isn't contained in the screen's color palette, the nearest color from the screen's palette will be used instead.
While the palette the browser uses to display your image can't be controlled by the Web page being displayed, and, in fact, can't even be known by the Web page, it is possible to optimize a .gif image for display in a browser. You can do this by using a special browser-safe color palette. A long time ago, I wrote an article about this safety palette. Suffice it to say that by optimizing your images to use a specific set of 216 colors, you can exercise a fair amount of control over how your images will look in virtually any browser on any user's screen.
Figure 6. A black-and-white JPEG image that uses only 247 shades of gray
Figure 7. Dithering Mode: the same image, but dithered to use the Safety Palette
Figure 8. Nearest Color: the same image, but reduced to the nearest colors of the Safety Palette
In the example above, I've produced three black-and-white images of a Seattle ferry. The top image is a .jpeg, which will do a good job at reproducing the original black-and-white image. The image in the center is a .gif file to which I have applied the safety palette and a dithering algorithm to closely approximate the original image. If you are viewing this on a display set to 256-color mode, then both the top and center images will have the same grainy look to them. Otherwise, the topmost image will look fine and the center image will look grainy.
The image on the bottom is another .gif, in which I am exaggerating the problem by applying the safety palette and using a nearest-color algorithm. The result produces larger areas of color—true to the .gif format, but splotchy in this image. However, this .gif is smaller than the .jpeg on the top; the dithering of the center image causes it to be the largest of them all.
I've only scratched the surface of proper Web site use of images and color. I hope you have found something here that will help you design your Web sites just a little bit better.
昨晚,不小心女儿的左肘关节脱臼了
无意之中,轻轻的一拉。这是女儿的第四次关节脱臼吧。也是送到人民医院住院部骨科找医生复位的。今天,没让她去幼儿园,在家休养一天再说。免得她在幼儿园里跟别的小朋友玩时出问题。
原来小的时候,她只知道哭,现在她不会哭了,会跟我们说,左边手臂痛。