VOA:A Lifetime of Exercise Slows Aging Process
A Lifetime of Exercise Slows Aging ProcessFrom VOA learning English,this is the Health&Lifestyle report.
这里是美国之音——健康&生活方式节目.
If you have been meaning to add more exercise to your daily routine,you may want to start sooner rather than later.
如果你已经打算每天增加点锻炼,或许你应该尽早开始.
A 2018 study has found a lifetime of regular exercise and activity can slow down the aging process.
2018年的一项研究发现,在人的一生中,定期锻炼和参加活动可以减缓衰老过程.
Researchers at Britain’s University of Birmingham and King’s Collage London say ...
文件上传与下载
学习笔记 : Java web之文件的上传与下载文件上传如何实现文件上传Apache组织提供了一个开源组件Commons-FileUpload( 依赖于common-io ),该组件可以方便地将multipart/form-data类型请求中的各种表单解析出来,并实现一个或多个文件的上传,同时也可以限制上传文件的大小等内容..并且性能优异,使用简单. FileUpload组件是通过Servlet来实现文件上传功能的,其工作流程如下图所示.
文件上传相关APIFileItem InterfaceFileItem接口用于封装单个表单字段元素的数据,一个表单字段元素对应一个FileItem对象.
DiskFileItemFactory ClassDiskFileItemFactory类用于将请求的消息实体中的每一个文件封装成单独的FileItem对象.如果上传的文件比较小,将直接保存在内存中,如果上传的文件比较大,则会以临时文件的形式,保存在磁盘的临时文件中,默认情况下,文件保存在内存/磁盘临时文件夹的临界值为10240,既10KB.
ServletFileUpload ClassSe ...
JSP 标准标签库
学习笔记 : Java web之JSTLJSTL介绍从JSP 1.1规范开始,JSP就支持使用自定义标签,使用自定义标签大大降低了JSP页面的复杂度.同时增加了代码的重用性.因此市面上出现了许多由不同厂商定制的功能相同的标签,继而导致网页制作者无从选择的问题.为了解决该问题,Sun公司制定了一套标准标签库(Java Server Pages Standard Tag Library),简称JSTL.其为一个JSP标签集合,封装了JSP应用的通用核心功能.
JSTL标签库
Core : 核心标签库,它包含实现Web应用中通用操作的标签.
SQL : 数据库标签库,用于访问数据库和对数据库中的数据进行操作的标签.
XML : 操作XML文档的标签库,它包含对XML文档中的数据进行操作的标签.
Functions : 函数标签库,提供了一套自定义EL函数,包含JSP网页制作者经常要用到的字符串操作.
JSTL的使用例如 : 测试<c:out>标签,需要使用taglib指令导入Core标签库.代码如下 :
1<%@taglib uri="http://java.s ...
VOA:Researchers Find Clues that Depression May Speed Brain Aging
Researchers Find Clues that Depression May Speed Brain AgingMemory and thinking skills naturally slow with age. Scientists are now looking inside living brains to tell if depression might speed aging. The scientists report that some of the signs they have found are worrisome.
随着年龄增长,人的记忆力和思维能力也随之减退.科学家正在研究活人大脑的内部情况,以判断抑郁症是否会加速大脑老化.科学家报告称,他们发现一些迹象令人十分担忧.
Depression has long been linked to some cognitive problems. Depression late in life even may increase the risk of developing Alzheimer's d ...
JSP 自定义标签
JSP 自定义标签入门
什么是JSP自定义标签?
自定义标签可以有效地将HTML代码与Java代码分类,从而使不懂Java编程的HTLML设计人员也可以编写出功能强大的JSP页面.JSP复规范中定义了多个用于开发自定义标签的接口和类,它们都位于javax.servlet.jsp.tagext包中,这些接口和类的继承关系如下所示.
标签分类
在JSP2.0之前,所有的标签都需要实现Tag接口,这样的标签称为: 传统标签( javax.servlet.jsp.tagext.Tag ). 后来为了简化标签的开发,JSP2.0规范又定义了一种新类型的标签,称为简单标签( javax.servlet.jsp.tagext.SimpleTag )
自定义标签的开发步骤
编写标签处理器
Tag接口和SimpleTag接口定义了JSP页面与标签处理器类之间的通信规则.如果JSP引擎在编译JSP页面时遇到了自定义标签,传统标签将会调用标签处理器的doStartTag()方法,简单标签将会调用标签处理器类的doTag()方法.
编写标签库描述符文件
要想让JSP引擎在遇到自定义标签时,能找 ...
VOA:5 Habits of Very Successful People
5 Habits of Very Successful PeopleFrom VOA Learning English,this is Health&Lifestyle report.
欢迎收听VOA慢速英语健康及生活方式报道.
Having success and being able to meet one’s goals requires knowledge,a sense of direction,hard work and resources. Some people might add to that list luck,connections and perhaps a strong belief in yourself.
获得成功以及达到某人的目标需要知识,方向感,努力付出和资源.一些人也许会将幸运,关系和自信加入其中.
We accomplish our goals one step at a time,doing a little each day. So,using your day effectively is important.
我们一步步 ...
详解Java对象的引用及赋值
细节 : 详解Java中对象的引用及赋值问题引入
前言
前些天学习数据结构与算法时特意写了一篇名为详解Linked-list的实现方式及其应用的文章,其中循环链表的代码中就淋漓尽致地体现了Java中对象的引用与赋值
循环链表的实现
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631 ...
VOA:One in Five Deaths Linked to Unhealthy Diet
One in Five Deaths Linked to Unhealthy DietIn 2017,eleven million deaths worldwide were linked to people eating diets high in sugar,salt and processed meat.
2017年,全国范围内有1100个死亡案例与摄入含糖,含盐,加工肉制品最高的食物有关.
Those foods were partly to blam for heart disease,cancer and diabetes,a new study found.
上述食物是导致心脏病,癌症,糖尿病的部分原因,这是一项新研究的发现.
The study is called the Global Burden of Disease,It followed eating trends in 195 countries 1990 to 2017. The findings were reported in the publication The Lancet.
该研究名为” ...
自定义EL函数防止HTML注入
学习笔记 : 自定义EL函数防止HTML注入防止HTML注入前
JSP程序代码
12345678910111213141516171819202122232425262728<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>`HTML`注入</title> </head> <body> <div align="center"> <form action="ResultServlet" method="post"> <table> <tr ...
VOA:Paris`Notre-Dame Cathedral Burning
Paris’ Notre-Dame Cathedral BurningA major fire began to burn on Monday at France’s world-famous Notre-Dame de Paris Cathedral.
周一,法国著名的巴黎圣母院大教堂发生大火.
Flames could be seen rising through the top of the monument. It tall,narrow spire later collapsed.
可以看到纪念碑的顶部火焰冲天,又高又窄的尖塔随后倒塌了.
The cathedral dates back to the 12th century. Frech writer Victor Hugo used it as the setting of his famous story,The Hunchback of Notre-Dame,first published in 1831.
这座大教堂可追溯到12世纪.法国作家维克多·雨果把它作为其著名小说《巴黎圣母院》的背景,该书于183 ...