当前位置:首页 > 英文周记 > 正文内容

interacts「INTERACT是什么期刊」

更新时间:2026-07-18 11:29:44 周记网3年前 (2023-03-27)英文周记64

求Struts英文资料要附带中文翻译

====

Struts

====

interacts「INTERACT是什么期刊」

Apache Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model-view-controller (MVC) architecture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top level Apache project in 2005.

Design goals and overview

In a standard Java EE web application, the client will typically submit information to the server via a web form. The information is then either handed over to a Java Servlet which processes it, interacts with a database and produces an HTML-formatted response, or it is given to a JavaServer Pages (JSP) document which intermingles HTML and Java code to achieve the same result. Both approaches are often considered inadequate for large projects because they mix application logic with presentation and make maintenance difficult.

The goal of Struts is to cleanly separate the model (application logic that interacts with a database) from the view (HTML pages presented to the client) and the controller (instance that passes information between view and model). Struts provides the controller (a servlet known as ActionServlet) and facilitates the writing of templates for the view or presentation layer (typically in JSP, but XML/XSLT and Velocity are also supported). The web application programmer is responsible for writing the model code, and for creating a central configuration file struts-config.xml which binds together model, view and controller.

Requests from the client are sent to the controller in the form of "Actions" defined in the configuration file; if the controller receives such a request it calls the corresponding Action class which interacts with the application specific model code. The model code returns an "ActionForward", a string telling the controller which output page to send to the client. Information is passed between model and view in the form of special JavaBeans. A powerful custom tag library allows it to read and write the content of these beans from the presentation layer without the need for any embedded Java code.

Struts also supports i18n (internationalization), provides facilities for the validation of data submitted by web forms, and includes a template mechani** called "Tiles" which (for instance) allows the presentation layer to be composed from independent header, footer, and content components.

Competing MVC frameworks

Although Struts is a well documented, mature and popular framework for building front ends to Java applications, it is facing new challenges from newer "light weight" MVC frameworks such as Spring MVC, Stripes and Tapestry. The new XForms standards and frameworks may also be another option to building complex web Form validations with Struts in the future.

The WebWork framework spun off from Apache Struts several years ago, aiming to offer enhancements and refinements while retaining the same general architecture of the original Struts framework. However, it was announced in December 2005 that Struts would re-merge with WebWork. WebWork 2.2 has been adopted as Apache Struts 2, which reached its first full release in February 2007.

Sun recently brought out a new addition to the Java platform, called JavaServer Faces (JSF). Aside from the original framework, the Apache Struts project also offers a JSF-based framework called Shale.

Other MVC frameworks that are not J2EE based include Ruby on Rails, WebObjects, Django, Catalyst, TurboGears, CakePHP, Symfony (for PHP), Zend, Achievo ATK, and CodeIgniter (for PHP). Struts4php is a version of the Struts framework for the PHP web scripting language. Girders is a port of the Struts framework in C# for Microsoft .NET.

 

===

中文

===

Struts 是 Apache软件基金会(ASF)赞助的一个开源项目。它最初是 Jakarta项目中的一个子项目,并在2004年3月成为ASF的顶级项目。它通过采用 Java Servlet/JSP 技术,实现了基于Java EE Web应用的 Model-View-Controller〔MVC〕设计模式的应用框架〔Web Framework〕,是 MVC 经典设计模式中的一个经典产品。

MVC结构

在 Struts 中,已经由一个名为 ActionServlet 的 Servlet 充当 控制器(Controller)的角色,根据描述模型、视图、控制器对应关系的 struts-config.xml 的配置文件,转发视图(View)的请求,组装响应数据模型(Model)。在 MVC 的 模型(Model)部分,经常划分为两个主要子系统(系统的内部数据状态与改变数据状态的逻辑动作),这两个概念子系统分别具体对应 Struts 里的 ActionForm 与 Action 两个需要继承实现超类。在这里,Struts 可以与各种标准的数据访问技术结合在一起,包括Enterprise Java Beans(EJB), JDBC 与 JNDI。在 Struts 的视图(View) 端,除了使用标准的JavaServer Pages(JSP)以外,还提供了大量的标签库使用,同时也可以与其他表现层组件技术(产品)进行整合,比如 Velocity Templates,XSLT 等。通过应用 Struts 的框架,最终用户可以把大部分的关注点放在自己的业务逻辑(Action)与 映射关系的配置文件(struts-config.xml)中。

发展历程

在 Java EE 的Web应用发展的初期,除了使用 Servlet 技术以外,普遍是在 JavaServer Pages (JSP)的源代码中,采用 HTML 与 Java 代码混合的方式进行开发。因为这两种方式不可避免的要把表现与业务逻辑代码混合在一起,都给前期开发与后期维护带来巨大的复杂度。为了摆脱上述的约束与局限,把业务逻辑代码从表现层中清晰的分离出来,2000年,Craig McClanahan 采用了 MVC 的设计模式开发Struts。后来该框架产品一度被认为是最广泛、最流行 JAVA 的 WEB 应用框架。

2006年,WebWork 与 Struts 这两个优秀的Java EE Web框架(Web Framework〕的团体,决定合作共同开发一个新的,整合了 WebWork 与 Struts 优点,并且更加优雅、扩展性更强的框架,命名为 “Struts 2”,原Struts的1.x 版本产品称为“Struts 1”。

至此,Struts项目并行提供与维护两个主要版本的框架产品——Struts 1 与 Struts 2。

 

专业英文救翻译

系统, 那眼睛和联合的构成和诊断相关的系统 conditions.i 美国人 Optometric 协会 (AOA), 1997. 今天验光的职业

包括加较多的超过仅仅规定和适宜的眼镜和隐形眼镜。 验光的医生是训练评估任何的病人 í s 视觉的情况和决定那

最好治疗为情况。 他们是看越来越多的当做主要的照料提供者为病人寻求眼睛的或视觉的照料。 情况典型地关心了为由医生

验光是: 角膜的磨灭、溃疡或传染; 绿内障; 而且其他的用制药的代理人、管理和指示需要治疗的眼睛疾病当

必需品; 视觉的技术问题,像是无能对动作,排列, 早期停止性的成熟和焦点那眼睛的机制在如此的工作中例如阅读, 驾驶, 计算机使用, 和在

工作相关的对嗜好和就业; 无能到适当地处理并且解释需要知觉、使看得见的和保持的数据, 像是那

对大部分的$$1需要学问工作; 贫穷的视觉-身体的协调同样地一与环境互动当做在运动, 职业, 和其他的每天活动需要

空间的裁判; 而且清楚问题如此的当做简单的近- 或远的-看得见或复杂化由于老化程序, 疾病、意外事件或故障。 医生

验光也工作到: 诊断,处理, 而且提到系统的疾病,像是高血压,糖尿病, 和其他哪一时常是第一在眼睛中发现; 提供前和

职位- 大瀑布的外科的照料、折射的激光治疗,网膜的问题, 和其他的需要的情况前和后外科的照料鼓励预防的

措施如此的当做监听婴儿和孩子 í s 视觉的发展、评估被讲工作, 而且促进营养的工作/学校/嗜好和卫生保健教育。 2。

给职业验光的景色是国家 í s 第三个大的中立派医疗职业。 与有利的工作情况, 一般的小时和一最小量

紧急呼叫, 它提议多数事业选项和棒的自由在选择一个位置方面到活的和练习。 验光师提供多数的主要视觉照料

管理。 在一半的人之上在美国穿着眼镜或隐形眼镜。 甚至可能不需要的人纠正的眼镜需要规则的照料避免, 发现

基于社区发现算法和图分析Neo4j解读《权力的游戏》下篇

其中的分析和可视化是用Gephi做的,Gephi是非常流行的图分析工具。但作者觉得使用Neo4j来实现更有趣。

节点中心度

节点中心度给出网络中节点的重要性的相对度量。有许多不同的方式来度量中心度,每种方式都代表不同类型的“重要性”。

度中心性(Degree Centrality)

度中心性是最简单度量,即为某个节点在网络中的联结数。在《权力的游戏》的图中,某个角色的度中心性是指该角色接触的其他角色数。作者使用Cypher计算度中心性:

MATCH (c:Character)-[:INTERACTS]- RETURN c.name AS character, count(*) AS degree ORDER BY degree DESC

character

degree

Tyrion

36

Jon

26

Sansa

26

Robb

25

Jaime

24

Tywin

22

Cersei

20

Arya

19

Joffrey

18

Robert

18

从上面可以发现,在《权力的游戏》网络中提利昂·兰尼斯特(Tyrion)和最多的角色有接触。鉴于他的心计,我们觉得这是有道理的。

加权度中心性(Weighted Degree Centrality)

作者存储一对角色接触的次数作为 INTERACTS 关系的 weight 属性。对该角色的 INTERACTS 关系的所有 weight 相加得到加权度中心性。作者使用Cypher计算所有角色的这个度量:

MATCH (c:Character)-[r:INTERACTS]- RETURN c.name AS character, sum(r.weight) AS weightedDegree ORDER BY weightedDegree DESC

character

weightedDegree

Tyrion

551

Jon

442

Sansa

383

Jaime

372

Bran

344

Robb

342

Samwell

282

Arya

269

Joffrey

255

Daenerys

232

介数中心性(Betweenness Centrality)

介数中心性:在网络中,一个节点的介数中心性是指其它两个节点的所有最短路径都经过这个节点,则这些所有最短路径数即为此节点的介数中心性。介数中心性是一种重要的度量,因为它可以鉴别出网络中的“信息中间人”或者网络聚类后的联结点。

图6中红色节点是具有高的介数中心性,网络聚类的联结点。

为了计算介数中心性,作者使用Neo4j 3.x或者apoc库。安装apoc后能用Cypher调用其170+的程序:

MATCH (c:Character) WITH collect(c) AS charactersCALL apoc.algo.betweenness(['INTERACTS'], characters, 'BOTH') YIELD node, scoreSET node.betweenness = scoreRETURN node.name AS name, score ORDER BY score DESC

name

score

Jon

1279.7533534055322

Robert

1165.6025171231624

Tyrion

1101.3849724234349

Daenerys

874.8372110508583

Robb

706.5572832464792

Sansa

705.1985623519137

Stannis

571.5247305125714

Jaime

556.1852522889822

Arya

443.01358430043337

Tywin

364.7212195528086

紧度中心性(Closeness centrality)

紧度中心性是指到网络中所有其他角色的平均距离的倒数。在图中,具有高紧度中心性的节点在聚类社区之间被高度联结,但在社区之外不一定是高度联结的。

图7 :网络中具有高紧度中心性的节点被其它节点高度联结

MATCH (c:Character) WITH collect(c) AS charactersCALL apoc.algo.closeness(['INTERACTS'], characters, 'BOTH') YIELD node, scoreRETURN node.name AS name, score ORDER BY score DESC

name

score

Tyrion

0.004830917874396135

Sansa

0.004807692307692308

Robert

0.0047169811320754715

Robb

0.004608294930875576

Arya

0.0045871559633027525

Jaime

0.004524886877828055

Stannis

0.004524886877828055

Jon

0.004524886877828055

Tywin

0.004424778761061947

Eddard

0.004347826086956522

使用python-igraph

Neo4j与其它工具(比如,R和Python数据科学工具)完美结合。我们继续使用apoc运行 PageRank和社区发现(community detection)算法。这里接着使用python-igraph计算分析。Python-igraph移植自R的igraph图形分析库。 使用 pip install python-igraph 安装它。

从Neo4j构建一个igraph实例

为了在《权力的游戏》的数据的图分析中使用igraph,首先需要从Neo4j拉取数据,用Python建立igraph实例。作者使用 Neo4j 的Python驱动库py2neo。我们能直接传入Py2neo查询结果对象到igraph的 TupleList 构造器,创建igraph实例:

from py2neo import Graphfrom igraph import Graph as IGraph graph = Graph query = ''' MATCH (c1:Character)-[r:INTERACTS]-(c2:Character) RETURN c1.name, c2.name, r.weight AS weight '''ig = IGraph.TupleList(graph.run(query), weights=True)

现在有了igraph对象,可以运行igraph实现的各种图算法来。

PageRank

作者使用igraph运行的第一个算法是PageRank。PageRank算法源自Google的网页排名。它是一种特征向量中心性(eigenvector centrality)算法。

在igraph实例中运行PageRank算法,然后把结果写回Neo4j,在角色节点创建一个pagerank属性存储igraph计算的值:

pg = ig.pagerank pgvs = for p in zip(ig.vs, pg): print(p) pgvs.append({"name": p[0]["name"], "pg": p[1]}) pgvs write_clusters_query = ''' UNWIND {nodes} AS n MATCH (c:Character) WHERE c.name = n.name SET c.pagerank = n.pg '''graph.run(write_clusters_query, nodes=pgvs)

现在可以在Neo4j的图中查询最高PageRank值的节点:

MATCH (n:Character) RETURN n.name AS name, n.pagerank AS pagerank ORDER BY pagerank DESC LIMIT 10

name

pagerank

Tyrion

0.042884981999963316

Jon

0.03582869669163558

Robb

0.03017114665594764

Sansa

0.030009716660108578

Daenerys

0.02881425425830273

Jaime

0.028727587587471206

Tywin

0.02570016262642541

Robert

0.022292016521362864

Cersei

0.022287327589773507

Arya

0.022050209663844467

社区发现(Community detection)

图8

社区发现算法用来找出图中的社区聚类。作者使用igraph实现的随机游走算法( walktrap)来找到在社区中频繁有接触的角色社区,在社区之外角色不怎么接触。

在igraph中运行随机游走的社区发现算法,然后把社区发现的结果导入Neo4j,其中每个角色所属的社区用一个整数来表示:

clusters = IGraph.community_walktrap(ig, weights="weight").as_clustering nodes = [{"name": node["name"]} for node in ig.vs]for node in nodes: idx = ig.vs.find(name=node["name"]).index node["community"] = clusters.membership[idx] write_clusters_query = ''' UNWIND {nodes} AS n MATCH (c:Character) WHERE c.name = n.name SET c.community = toInt(n.community) '''graph.run(write_clusters_query, nodes=nodes)

我们能在Neo4j中查询有多少个社区以及每个社区的成员数:

MATCH (c:Character) WITH c.community AS cluster, collect(c.name) AS members RETURN cluster, members ORDER BY cluster ASC

cluster

members

[Aemon, Alliser, Craster, Eddison, Gilly, Janos, Jon, Mance, Rattleshirt, Samwell, Val, Ygritte, Grenn, Karl, Bowen, Dalla, Orell, Qhorin, Styr]

1

[Aerys, Amory, Balon, Brienne, Bronn, Cersei, Gregor, Jaime, Joffrey, Jon Arryn, Kevan, Loras, Lysa, Meryn, Myrcella, Oberyn, Podrick, Renly, Robert, Robert Arryn, Sansa, Shae, Tommen, Tyrion, Tywin, Varys, Walton, Petyr, Elia, Ilyn, Pycelle, Qyburn, Margaery, Olenna, Marillion, Ellaria, Mace, Chataya, Doran]

2

[Arya, Beric, Eddard, Gendry, Sandor, Anguy, Thoros]

3

[Brynden, Catelyn, Edmure, Hoster, Lothar, Rickard, Robb, Roose, Walder, Jeyne, Roslin, Ramsay]

4

[Bran, Hodor, Jojen, Luwin, Meera, Rickon, Nan, Theon]

5

[Belwas, Daario, Daenerys, Irri, Jorah, Missandei, Rhaegar, Viserys, Barristan, Illyrio, Drogo, Aegon, Kraznys, Rakharo, Worm]

6

[Davos, Melisandre, Shireen, Stannis, Cressen, Salladhor]

7

[Lancel]

角色“大合影”

《权力的游戏》的权力图。节点的大小正比于介数中心性,颜色表示社区(由随机游走算法获得),边的厚度正比于两节点接触的次数。现在已经计算好这些图的分析数据,让我们对其进行可视化,让数据看起来更有意义。

Neo4j自带浏览器可以对Cypher查询的结果进行很好的可视化,但如果我们想把可视化好的图嵌入到其它应用中,可以使用Javascript可视化库Vis.js。从Neo4j拉取数据,用Vis.js的neovis.js构建可视化图。Neovis.js提供简单的API配置,例如:

var config = { container_id: "viz", server_url: "localhost", labels: { "Character": "name" }, label_size: { "Character": "betweenness" }, relationships: { "INTERACTS": }, relationship_thickness: { "INTERACTS": "weight" }, cluster_labels: { "Character": "community" } }; var viz = new NeoVis(config); viz.render;

其中:

节点带有标签Character,属性name;

节点的大小正比于betweenness属性;

可视化中包括INTERACTS关系;

关系的厚度正比于weight属性;

节点的颜色是根据网络中社区community属性决定;

从本地服务器localhost拉取Neo4j的数据;

在一个id为viz的DOM元素中展示可视化。

interact读作因特ra科特还是因特哎科特?

正确的读法是你的第二种 因特哎科特

这个词本身是合成词, inter-act , 读的时候也是按照两个单独部分再连起来那样读。

interact词性变化

interact词性变化: 复数: interactions; 动词: interact; 例句(用法): While the other children interacted and played together, Ted ignored them.

interactions

英 [ˌɪntərˈækʃənz]   美 [ˌɪntəˈrækʃənz]  

n.相互影响(作用,制约,配合);交互作用(影响);交相感应;干扰(涉)。

interaction的复数。

interact

英 [ˌɪntərˈækt]   美 [ˌɪntərˈækt]  

vi.互动;相互作用;交流;相互影响;沟通;合作。

n.同“entr'acte”。

After initiation, the youths started to interact with the older members.

入会仪式后,这些小伙子与老成员开始互动。

There will be a true global village in which telephones, computers and televisions interact.

将会出现一个**、电脑、电视互动的真正的地球村。

Teachers have a limited amount of time to interact with each child.

教师和每个孩子沟通的时间有限。

Perfume interacts with the skin's natural chemicals.

香水和皮肤的天然化学物质相互作用。

interact是什么意思?

interact

英 [ˌɪntərˈækt]   美 [ˌɪntərˈækt]

vi.

互动;相互作用;交流;相互影响;沟通;合作

n.

同“entr'acte”

第三人称单数: interacts现在分词: interacting过去式: interacted过去分词: interacted

派生词: interaction n.

双语例句

1

After initiation, the youths started to interact with the older members

入会仪式后,这些小伙子与老成员开始互动。

《柯林斯高阶英汉双解学习词典》

2

There will be a true global village in which telephones, computers and televisions interact.

将会出现一个**、电脑、电视互动的真正的地球村。

《柯林斯高阶英汉双解学习词典》

3

Teachers have a limited amount of time to interact with each child.

教师和每个孩子沟通的时间有限。

《牛津高阶英汉双解词典》

4

Perfume interacts with the skin's natural chemicals.

香水和皮肤的天然化学物质相互作用。

《牛津高阶英汉双解词典》

5

Millions of people want new, simplified ways of interacting with a computer

数以百万计的人们想要新的简化方式实现人机交互。

《柯林斯高阶英汉双解学习词典》

6

You have to understand how cells interact

你必须明白细胞是怎样相互作用的。

《柯林斯高阶英汉双解学习词典》

7

Atoms within the fluid interact with the minerals that form the grains.

液体中的原子与形成颗粒的矿物质相互作用。

《柯林斯高阶英汉双解学习词典》

8

While the other children interacted and played together, Ted ignored them.

当别的孩子相互交流、一起玩耍的时候,泰德对他们不予理睬。

《柯林斯高阶英汉双解学习词典》

9

Even though I'm supposed to be working by myself, there are other people who I can interact with.

即便是需要我一个人工作,我还是可以和别人进行交流的。

《柯林斯高阶英汉双解学习词典》

10

All things are interrelated and interact on each other.

一切事物互相联系并相互作用。

《汉英大词典》

标签: interacts

“interacts「INTERACT是什么期刊」” 的相关文章

interacts「interact什么词性」

interacts「interact什么词性」

interact词性变化 interact词性变化: 复数: interactions; 动词: interact; 例句(用法): While the other children interact...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。