SVG is a language for describing 2D graphics and graphical applications in XML.
Svg 是一种基于xml语言的定义二维图形的应用程序。
What you should already know-你应该预先知道什么?
Before you continue, you should have some basic understanding of the following:
在继续学习之前,你应该确保你有以下知识基础:
HTML
Basic XML
If you want to study these subjects first, find the tutorials on our Home page.
如果你想先学习一下这些知识。请访问我们的主页。
What is SVG?
什么是svg?
SVG stands for Scalable Vector Graphics
Svg指的是Scalable Vector Graphics (可伸缩向量图形)
SVG is used to define vector-based graphics for the Web
Svg用来定义面向web的向量图形。
SVG defines the graphics in XML format
Svg基于xml语言定义图形。
SVG graphics do NOT lose any quality if they are zoomed or resized
当你伸缩或重新设置图形大小时,svg图形不损失质量。
Every element and every attribute in SVG files can be animated
Svg里的每一个元素和属性都可以自定义。
SVG is a World Wide Web Consortium (W3C) recommendation
Svg是一个W3C推荐标准。
SVG integrates with other W3C standards such as the DOM and XSL
Svg可以和W3C的其他推荐标准结合使用。
SVG History & Advantages-SVG的历史和优点
SVG 1.1 became a W3C Recommendation in January 2003.
SVG 1.1在2003年1月成为了w3c的推荐标准
Sun Microsystems, Adobe, Apple, IBM, and Kodak are some of the well-known organizations that have been involved in defining SVG.
Sun Microsystems, Adobe, Apple, IBM, and Kodak是一些参与定义SVG的著名公司。
Advantages of using SVG over other image formats (like JPEG and GIF):
与其他图形格式(jgeg&gif)使用SVG的优点如下:
Ø SVG files can be read and modified by a large range of tools (e.g. notepad)
Ø SVG 文件可以被很多的工具(比如记事本)阅读和编辑。
Ø SVG files are smaller and more compressible than JPEG and GIF images
Ø SVG 文件比 JPEG和GIF更小压缩比更大。
Ø SVG images are scalable
Ø SVG图像是可压缩的。
Ø SVG images can be printed with high quality at any resolution
Ø SVG图像可以以任何分辨率高清晰打印。
Ø SVG images are zoomable. Any part of the image can be zoomed without degradation
Ø SVG图像是可缩放的。图像的任何部分都可以无损失缩放。
Ø Text in SVG is selectable and searchable (excellent for making maps)
Ø SVG里的文字是可供选择和搜索(制作地图的良好功能)
Ø SVG works with Java technology
Ø SVG可以和java技术共同工作
Ø SVG is an open standard
Ø SVG是一个开放标准
Ø SVG files are pure XML
Ø SVG文件是纯xml的。
The main competitor to SVG is Flash. The two have a lot of similar features. The biggest advantage SVG has over Flash is the compliance with other standards (e.g. XSL and the DOM). Flash relies on proprietary technology that is not open source.
The major drawback of SVG at the moment is that no browser fully supports SVG. However, the future of SVG seems bright: Mozilla and Microsoft plan to fully support SVG. Adobe GoLive 5 already supports SVG and the number of SVG editors are growing.
当前,svg的最大缺点是没有完全支持svg的浏览器。但是,svg的未来是非常光明的: Mozilla 和Microsoft计划完全支持svg。Adobe GoLive 5已经完全支持svg,svg编辑软件的数量也在扩大。
Look at the official W3C list of implementations of SVG
To view SVG files today, you will have to install a plug-in such as the Adobe SVG Viewer.
The first line contains the XML declaration. Notice the standalone attribute! This attribute specifies whether the SVG file "stands alone", or contains a reference to an external file.
第一行包含了xml声明。注意standalone属性,这个属性规定本svg文件是独立的还是包含一个对外部文件的引用。
standalone="no" means that the SVG document has a reference to an external file - in this case, the DTD.
standalone="no"意味着本svg文档包含一个对外部文件的引用,比如说DTD文件。
The second and the third line refer to the external SVG DTD. The DTD is located at "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd". The DTD resides at the W3C and it contains all allowable SVG elements.
首先看看 WeakReference
wiki 上 Weak reference 的一个例子:
public class ReferenceTest {
public static void main(String[] args) throws InterruptedException {
WeakReference r = new Wea
有一个线上环境使用的是c3p0数据库,为外部提供接口服务。最近访问压力增大后台tomcat的日志里面频繁出现
com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResou
https://weblogs.java.net/blog/mriem/archive/2013/11/22/jsf-tip-45-create-composite-component-custom-namespace
When you developed a composite component the namespace you would be seeing would
一、复本集为什么要加入Arbiter这个角色 回答这个问题,要从复本集的存活条件和Aribter服务器的特性两方面来说。 什么是Artiber? An arbiter does
not have a copy of data set and
cannot become a primary. Replica sets may have arbiters to add a
# include <stdio.h>
int main(void)
{
int a[5] = {1, 2, 3, 4, 5};
//a 是数组的名字 5是表示数组元素的个数,并且这五个元素分别用a[0], a[1]...a[4]
int i;
for (i=0; i<5; ++i)
printf("%d\n",