体验Google翻译的正确性

下面这段英文摘自英语维基百科 Google Earth 3D imagery:

Google Earth shows 3D building models in some cities, including 
photorealistic 3D imagery. The first 3D buildings in Google 
Earth were created using 3D modeling applications such as 
SketchUp and, beginning in 2009, Building Maker,[19] and 
were uploaded to Google Earth via the 3D Warehouse. In June 
2012, Google announced that it would be replacing user-generated 
3D buildings with an auto-generated 3D mesh.[20] This would be 
phased in, starting with select larger cities, with the notable 
exception of cities such as London and Toronto which required 
more time to process detailed imagery of their vast number of 
buildings. The reason given is to have greater uniformity in 
3D buildings, and to compete with Nokia Here and Apple Maps, 
which were already using this technology. The coverage began 
that year in 21 cities in four countries.[21] By early 2016, 
3D imagery had been expanded to hundreds of cities in over 40 
countries, including every U.S. state and encompassing every 
continent except Antarctica.
In 2009, in a collaboration between Google and the Museo del 
Prado in Madrid, the museum selected 14 of its paintings to 
be photographed and displayed at the resolution of 14,000 
megapixels inside the 3D version of the Prado in Google Earth 
and Google Maps.[22][23]

经过 https://translate.google.cn  翻译后:

`4]EXJ[{4O{}F9K({]2~A0M.png

可见Google翻译对自然语言处理的准确度还是非常高的。

SpringMVC静态页面例子

下面的例子说明了如何使用 Spring MVC 框架来编写一个简单的基于 web 的应用程序,它可以在 <mvc:resources> 标签的帮助下访问静态页面和动态页面。为了开始使用它,让我们在恰当的位置使用 Eclipse IDE,然后按照下面的步骤使用 Spring 的 Web 框架来开发一个动态的基于表单的 Web 应用程序:

步骤 描述
1 创建一个名称为 HelloWeb 的动态 Web 项目,并且在已创建的项目的 src文件夹中创建一个包 com.tutorialspoint
2 将上面提到的 Spring 和其他库拖拽到文件夹 WebContent/WEB-INF/lib中。
3 在 com.tutorialspoint 包下创建一个 Java 类 WebController
4 在 WebContent/WEB-INF 文件夹下创建 Spring 的配置文件 Web.xml 和 HelloWeb-servlet.xml
5 在 WebContent/WEB-INF 文件夹下创建名称为 jsp 的子文件夹。在这个子文件夹下创建一个视图文件 index.jsp
6 在 WebContent/WEB-INF 文件夹下创建名称为 pages 的子文件夹。在这个子文件夹下创建一个静态文件 final.htm
7 最后一步是创建所有的源代码和配置文件的内容,并导出该应用程序,正如下面解释的一样。


这里是 WebController.java 文件的内容:

package com.tutorialspoint;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class WebController {
   @RequestMapping(value = "/index", method = RequestMethod.GET)
   public String index() {   
       return "index";
   }   
   @RequestMapping(value = "/staticPage", method = RequestMethod.GET)   
   public String redirect() {     
      return "redirect:/pages/final.htm";
   }
}


下面是 Spring Web 配置文件 web.xml 的内容:

<web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <display-name>Spring Page Redirection</display-name>

    <servlet>
        <servlet-name>HelloWeb</servlet-name>
        <servlet-class>
           org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>HelloWeb</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

</web-app>


下面是另一个 Spring Web 配置文件 HelloWeb-servlet.xml 的内容:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:context="http://www.springframework.org/schema/context"
 xmlns:mvc="http://www.springframework.org/schema/mvc"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://www.springframework.org/schema/mvc
 http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
 http://www.springframework.org/schema/context
 http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <context:component-scan base-package="com.tutorialspoint" />

    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/jsp/" />
    <property name="suffix" value=".jsp" />
    </bean>

    <mvc:resources mapping="/pages/**" location="/WEB-INF/pages/" />
    <mvc:annotation-driven/>

</beans>

在这里,<mvc:resources…./> 标签被用来映射静态页面。 mapping 属性必须是一个指定一个 http 请求的 URL 模式的 Ant 模式。 location 属性必须指定一个或者多个具有包含图片,样式表,JavaScript 和其他静态内容的静态页面的资源目录位置。多个资源位置可以使用逗号分隔这些值的列表来被指定。

下面是 Spring 视图文件 WEB-INF/jsp/index.jsp 的内容。这将是一个登陆页面,这个页面将发送一个请求来访问 staticPage 的 service 方法,它将重定向这个请求到 WEB-INF/pages 文件夹中的一个可用的静态页面。

<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<html>
<head>
    <title>Spring Landing Page</title>
</head>
<body>
<h2>Spring Landing Pag</h2>
<p>Click below button to get a simple HTML page</p>
<form:form method="GET" action="/HelloWeb/staticPage">
<table>
    <tr>
    <td>
    <input type="submit" value="Get HTML Page"/>
    </td>
    </tr>
</table>  
</form:form>
</body>
</html>


下面是 Spring 视图文件 WEB-INF/pages/final.htm 的内容:

<html>
<head>
    <title>Spring Static Page</title>
</head>
<body>
<h2>A simple HTML page</h2>
</body>
</html>

最后,下面是包含在你的 web 应用程序中的 Spring 和其他库的列表。你仅仅需要将这些文件拖拽到 WebContent/WEB-INF/lib 文件夹中。

  • commons-logging-x.y.z.jar

  • org.springframework.asm-x.y.z.jar

  • org.springframework.beans-x.y.z.jar

  • org.springframework.context-x.y.z.jar

  • org.springframework.core-x.y.z.jar

  • org.springframework.expression-x.y.z.jar

  • org.springframework.web.servlet-x.y.z.jar

  • org.springframework.web-x.y.z.jar

  • spring-web.jar

一旦你完成了创建源代码和配置文件后,导出你的应用程序。右键单击你的应用程序,并且使用 Export > WAR File 选项,并且在 Tomcat 的 webapps文件夹中保存你的 HelloWeb.war 文件。

换头手术为什么不能成功

在2015年的TEDx谈话中,塞尔吉奥·卡纳维罗(Sergio Canavero)做出了一个大胆且引人注意的决定:他发誓到2017年时,他将完成人体头部移植手术。如果你一直在关注这个热门话题,你可能会认为他遵循了他的诺言。

然而事实上,他并没有。

卡纳维罗还没有完成一次成功的人体头部移植手术,而且他不太可能做得到。

0.jpg

卡纳维罗

我们重复一遍:没有人成功完成过人体头部移植手术。

手术进行过程中会产生的种种不好影响(包括关于科学怪人和围绕着干扰尸体这种禁忌行为的讨论)之外,这并不是一个完全没有价值的想法。大多数科学家和医生认为,将时间用来完善逐个解决问题的程序是比较好的,但是如果可以一次就使四肢瘫痪的病人重新行走,那将是一件非常棒的事情。那么,为什么这些人没有进行这样的工作研究呢?

某些器官相对来说比较容易移植,以心脏为例。虽然心脏手术本质上仍然是危险的,但是因为医生需要重新连接接受者的身体中的管道系统里的管道相对较少,因此相对容易移植。

而脊髓则恰恰相反。

医生从来没有成功地将完全分离的脊髓重新连接起来。脊髓本身具有数以百万计的神经连接,为了将一个被完全切断的脊髓重新恢复机能,要将这些神经重新连接,这是非常困难的。

想想最近出现的一些具有突破性的新的移植技术,比如替换阴茎,面部,手部或子宫。每种技术出现都伴着争议,而且需要与各自领域拥有顶尖水平的外科医生合作。在2017年,我们刚刚开始用这种方式使神经连接并运作良好。如果我们又完成了同样的壮举,这就意味着我们又获得了一个巨大的成就。

卡纳维罗先前曾宣称成功将断裂的小鼠脊髓连接上,但他发表的结果受到了一些专家的质疑。事实上,许多人甚至质疑他是否希望在这一努力中取得成功。

另一个问题是大脑。这是一个独特而又精细的器官。在失去血液供应的几分钟之后,它就无法得到修复。一颗刚刚从身体里取出来的心脏,包裹着放在冰里,可以在空运过后回到胸腔中继续工作,即使大脑已经被冷冻起来,当外科医生从它自己的血液供应中取出它并精心制造了能在新身体的支持下提供它的连接,这时候的大脑还能正常运作吗?这似乎不太可能,特别是考虑到只要大脑受到任何损害,可能就会导致这颗大脑移植后无法正常运作。的确,病人们想通过更换身体重新获得健康,但是他们应该不想拥有一个失去意识或者智力的脑袋,这种时候身体健康又有何用呢?

上述问题给我们带来了麻烦。与器官移植不同的是,接受诸如阴茎、脸部以及双手之类的手术,容易使病人产生排斥心理。第一个成功接受阴茎移植的病人在手术成功不久后,痛苦的向医生求助,希望医生可以切除这个新的阴茎。面部移植也有类似的问题,所有器官接受者必须服用药物来抑制其免疫系统对器官的排斥,但是当看到别人尸体的脸部或者阴茎成为自己身体熟悉的一部分时,病人们往往会感到不安。

如果某人接受了头部移植手术,在获得全新的身体后,这种不安的程度会有多重呢?当病人们知道他们之所以服用药物是为了防止这具原本不属于他们的身体排斥自己的脑袋时,他们会是什么感受?从某种层面上来说,病人会对这具拼命地排斥其大脑的身体感到不安。

卡纳维罗的“成功”移植其实是在两具尸体上进行。现在,在尸体上进行一项全新的手术是很重要的。这样做的目的就是先在尸体上练习,从而推广到病人身上。上文提到的阴茎、面部移植都是在众多尸体上实践变得成熟的。但是,这些手术在真正应用到病人身上之前是没有被称为成功的手术的。

佳士得以4.5亿美元卖出<<救世主>>

jd.jpg

(左图)达芬奇红色粉笔画的肖像,画于大约1512年至1515年,被广泛视为最初的达芬奇自画像。(右图)2017年11月15日,佳士得拍卖《救世主》,最终以4.5亿美元(包括手续费)售出,创下单一艺术品的最高拍卖价纪录

Apache设置防盗链

盗链,就是盗取链接,假如我们的网站有很多好看的图片,别人可以查看我们网站图片的链接,然后应用在他的网站上,这样的话,去访问他的网站,实际上消耗的是我们的流量(因为实际链接在我们这里),这样我们就不得不去配置防盗链,使得别人不能复制我们图片的链接。

[root@localhost ~]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf 
<VirtualHost *:80>
    DocumentRoot "/data/www"
    ServerName www.test.com
    ErrorLog "logs/test.com_error_log"
    CustomLog "logs/test.com_access_log" combined
    SetEnvIfNoCase Referer "^http://.*\.test\.com" local_ref    # 表示只有 test.com 和 abc.com 的访问才允许,其他的都拒绝
    SetEnvIfNoCase Referer ".*\. abc\.com" local_ref
    <filesmatch "\.(txt|doc|mp3|zip|rar|jpg|gif|png)">
        Order Allow,Deny
        Allow from env=local_ref
        Deny from all
    </filesmatch>
</VirtualHost>