November 30, 2009
November 29, 2009
点积
两个向量u,v的点积是一个标量,用u · v表示。在三维空间中它被定义为:uxvx + uyvy + uzvz。
点积的值由以下三个值确定:
u的大小v的大小u,v夹角的余弦。在u,v非零的前提下,点积如果为负,则u,v形成的角大于90度;如果为零,那么u,v垂直;如果为正,那么u,v形成的角为锐角。
dot product
In Euclidean geometry, the dot product, length, and angle are related. For a vector a, the dot product a · a is the square of the length of a, or
where |a| denotes the length (magnitude) of a. More generally, if b is another vector
where |a| and |b| denote the length of a and b and θ is the angle between them.
November 28, 2009
Some Operations of JScrollPane
Operations of Operations of JScrollPane JScrollPane
Fill in JScrollPane with data
JList buddyList = new Jlist();
JScrollPane buddyScroll = new JScrollPane(buddyList);
String[] buddies = new String[]
{“Thomas”, “Roy”, “Martin”, “Tom”, “Kevin”, “Pierre”};
buddyList.setListData(buddies);
(more...)
java中的split的用法
下面的示例阐明了如何使用 String.split 方法将字符串分解为基本标记:
String[] result = "this is a test".split("\\s");
for (int x=0; x<result.length; x++)
System.out.println(result[x]);
输出以下字符串:
this
is
a
test
java中的StringTokenizer的用法
StringTokenizer st = new StringTokenizer("this is a test");
while (st.hasMoreTokens()) {
System.out.println(st.nextToken());
}
输出以下字符串:
this
is
a
test
StringTokenizer 是出于兼容性的原因而被保留的遗留类(虽然在新代码中并不鼓励使用它)。建议所有寻求此功能的人使用 String 的 split 方法或 java.util.regex 包。
WordPress 文件上传限制问题
from: http://tang.jubailan.com/
升级到wordpress 2.8.5之后,想要上传视频文件,结果提示“文件类型不符合安全规则。试试别的文件”-“File type does not meet security guidelines. Try another.”
wordpress 2.8.5之前的版本,用管理员账号是可以跳过文件类型检测的,也就是所有文件都能上传。到了2.8.5就改变了,解决的方法无数,可以修改源程序也可以装插件。
Flash 模擬火效果
from : http://space.flash8.net/space/?534614/viewspace-447153.html
link:
testbitmapdata
src:
src

