- 浏览: 204618 次
- 来自: ...
-
文章分类
最新评论
-
赤道螞蟻:
如果是數據庫有定時任務,定時更新表的數據。 表中數據變化時,主 ...
用socket.io实现WebSocket的一个简单例子 -
cwalet:
在世界的中心呼喚愛 写道提示找不到 expressnpm in ...
用socket.io实现WebSocket的一个简单例子 -
在世界的中心呼喚愛:
提示找不到 express
用socket.io实现WebSocket的一个简单例子 -
Anleb:
def m1(a)
puts 'invoke m1'
pu ...
Ruby的一些疑问 -
biyeah:
补充,任何类,只要实现to_proc方法,都可以与&结 ...
Ruby的一些疑问
参考:http://www.bennadel.com/blog/2171-Realtime-Messaging-And-Synchronization-With-NowJS-And-Node-js.htm
先说例子实现的功能。网页上有一图片,图片可以拖动。用浏览器打开多个同一网页,当图片移动时,其它页面的图片会同步移动。例子也展示了用jQuery实现图片的拖动。
测试环境window7,nodejs v0.6.5 分别用ie,firefox,chrome打开http://127.0.0.1:8080/client.html,所有该网页上的图片会同步移动。贴上代码。
server.js端:
需要用sock.io和nowjs第三包,推荐用npm方式安装。nowjs包在window的安装可参考:
http://blog.nowjs.com/running-nowjs-natively-on-windows
我把重要的东西摘录下来:
client.html
先说例子实现的功能。网页上有一图片,图片可以拖动。用浏览器打开多个同一网页,当图片移动时,其它页面的图片会同步移动。例子也展示了用jQuery实现图片的拖动。
测试环境window7,nodejs v0.6.5 分别用ie,firefox,chrome打开http://127.0.0.1:8080/client.html,所有该网页上的图片会同步移动。贴上代码。
server.js端:
需要用sock.io和nowjs第三包,推荐用npm方式安装。nowjs包在window的安装可参考:
http://blog.nowjs.com/running-nowjs-natively-on-windows
// Include the necessary modules. var sys = require("util"); var http = require("http"); var url = require("url"); var path = require("path"); var fileSystem = require("fs"); // ---------------------------------------------------------- // // ---------------------------------------------------------- // // Create an instance of the HTTP server. var server = http.createServer( function (request, response) { // Get the requested "script_name". This is the part of the // path after the server_name. var scriptName = request.url; // Convert the script name (expand-path) to a physical file // on the local file system. var requestdFilePath = path.join(process.cwd(), scriptName); // Read in the requested file. Remember, since all File I/O // (input and output) is asynchronous in Node.js, we need to // ask for the file to be read and then provide a callback // for when that file data is available. // // NOTE: You can check to see if the file exists *before* you // try to read it; but for our demo purposes, I don't see an // immediate benefit since the readFile() method provides an // error object. fileSystem.readFile( requestdFilePath, "binary", function (error, fileBinary) { // Check to see if there was a problem reading the // file. If so, we'll **assume** it is a 404 error. if (error) { // Send the file not found header. response.writeHead(404); // Close the response. response.end(); // Return out of this guard statement. return; } // If we made it this far then the file was read in // without a problem. Set a 200 status response. response.writeHead(200); // Serve up the file binary data. When doing this, we // have to set the encoding as binary (it defaults to // UTF-8). response.write(fileBinary, "binary"); // End the response. response.end(); } ); } ); // Point the server to listen to the given port for incoming // requests. server.listen(8080); // ---------------------------------------------------------- // // ---------------------------------------------------------- // // Create a local memory space for further now-configuration. (function () { // Now that we have our HTTP server initialized, let's configure // our NowJS connector. var nowjs = require("now"); // After we have set up our HTTP server to serve up "Static" // files, we pass it off to the NowJS connector to have it // augment the server object. This will prepare it to serve up // the NowJS client module (including the appropriate port // number and server name) and basically wire everything together // for us. // // Everyone contains an object called "now" (ie. everyone.now) - // this allows variables and functions to be shared between the // server and the client. var everyone = nowjs.initialize(server); // Create primary key to keep track of all the clients that // connect. Each one will be assigned a unique ID. var primaryKey = 0; // When a client has connected, assign it a UUID. In the // context of this callback, "this" refers to the specific client // that is communicating with the server. // // NOTE: This "uuid" value is NOT synced to the client; however, // when the client connects to the server, this UUID will be // available in the calling context. everyone.connected( function () { this.now.uuid = ++primaryKey; } ); // Add a broadcast function to *every* client that they can call // when they want to sync the position of the draggable target. // In the context of this callback, "this" refers to the // specific client that is communicating with the server. everyone.now.syncPosition = function (position) {//syncPosition()在这里定义,在客户端调用 // Now that we have the new position, we want to broadcast // this back to every client except the one that sent it in // the first place! As such, we want to perform a server-side // filtering of the clients. To do this, we will use a filter // method which filters on the UUID we assigned at connection // time. everyone.now.filterUpdateBroadcast(this.now.uuid, position); }; // We want the "update" messages to go to every client except // the one that announced it (as it is taking care of that on // its own site). As such, we need a way to filter our update // broadcasts. By defining this filter method on the server, it // allows us to cut down on some server-client communication. everyone.now.filterUpdateBroadcast = function (masterUUID, position) { // Make sure this client is NOT the same client as the one // that sent the original position broadcast. if (this.now.uuid == masterUUID) { // Return out of guard statement - we don't want to // send an update message back to the sender. return; } // If we've made it this far, then this client is a slave // client, not a master client. this.now.updatePosition(position);//updatePosition()为客户端定义的方法,在这里可调用,用this修饰now。 }; })(); // ---------------------------------------------------------- // // ---------------------------------------------------------- // // Write debugging information to the console to indicate that // the server has been configured and is up and running. sys.puts("Server is running on 8080");
我把重要的东西摘录下来:
引用
Once the core HTTP server is configured and the NowJS module is initialized, we are given access to the "everyone" object. This everyone object then provides us with access to the server-side "now" scope. This "now" scope is shared between the server and every one of the clients. Anything added to or removed from the server-side "now" scope is also added to or removed from every client currently (or eventually) connected to the server.
This is true for both variables and functions! Notice that my server-side Node.js code defines two methods: syncPosition() and filterUpdateBroadcast(). By defining them in the "everyone.now" scope, I am making them available to both the server and to every single one of the connected clients.
But what about that, "everyone.now.updatePosition()", function? Where did that come from? Ah-ha! Here's the real, "there is no spoon" mind-screw - that function is defined on the client (which we'll see in a minute). And, since it's defined in the client's "now" scope, the server-side Javascript can then invoke it as if there were no separation between the server and client contexts.
This is true for both variables and functions! Notice that my server-side Node.js code defines two methods: syncPosition() and filterUpdateBroadcast(). By defining them in the "everyone.now" scope, I am making them available to both the server and to every single one of the connected clients.
But what about that, "everyone.now.updatePosition()", function? Where did that come from? Ah-ha! Here's the real, "there is no spoon" mind-screw - that function is defined on the client (which we'll see in a minute). And, since it's defined in the client's "now" scope, the server-side Javascript can then invoke it as if there were no separation between the server and client contexts.
client.html
<!DOCTYPE html> <html> <head> <title>NowJS And Node.js Realtime Communication</title> <style type="text/css"> html, body { height: 100%; overflow: hidden; width: 100%; } img { left: 9px; position: absolute; top: 70px; } </style> <!-- We have this file stored explicitly. --> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/> </script> <!-- The NowJS HTTP augmentation will take care of routing this - we don't actually have this physical file stored at this file path. --> <script type = "text/javascript" src = "/nowjs/now.js" ></script> </head> <body> <h1> NowJS And Node.js Realtime Communication </h1> <!-- This will be draggable. When this image drags, we are going to sync the position of it across browsers. --> <img id="myhead" src="./myhead.gif" width="100" height="100" alt="It's my head, do you like it?" /> <!-- Configure the client-side script. --> <script type="text/javascript"> // Get a reference to the target draggable. var myhead = $("#myhead"); // Get a reference to the body - this is the element on which // we'll be tracking mouse movement once the draggable // tracking has been turned on. var body = $("body"); // On mouse-down, turn on draggability. myhead.mousedown( function (event) { // Prevent the default behavior. event.preventDefault(); // Get the current position of the mouse within the // bounds of the target. var localOffset = { x:(event.pageX - myhead.position().left), y:(event.pageY - myhead.position().top) }; // Start tracking the mouse movement on the body. // We're tracking on the body so that the mouse can // move faster than the tracking. body.mousemove( function (event) { // Create a new position object. var newPosition = { left:(event.pageX - localOffset.x), top:(event.pageY - localOffset.y) }; // Update the target position locally. myhead.css(newPosition); // Announce the updated position so that we // can sync accross all clients with NowJS. now.syncPosition(newPosition);//syncPosition()是在服务器端定义的方法,可在客户端调用。 } ); } ); // On mouse-up, turn off draggability. myhead.mouseup( function (event) { // Unbind the mousemove - no need to track movement // once the mouse has been lifted. body.unbind("mousemove"); } ); // I allow the remove server to make a request to update the // position of the target. // // NOTE: By defining this function in the NOW scope, it gives // the server access to it as well. now.updatePosition = function (newPosition){ //updatePosition()这个方法在客户端定义,可在服务器端调用 // Check to see if this client is in master mode; if so, // we won't update the position as this client is // actively updating its own position. myhead.css(newPosition); }; </script> </body> </html>
引用
When the user moves the image on the client, the client broadcasts the new position using the "now.syncPosition()" function. This function, which was defined on the server, then pushes the updated position down to all the other clients using the "now.updatePosition()" function, which was defined on the client.
Even after coding this myself, it's still somewhat confusing; so, let's look at a quick rundown of the various functions to see where they were defined and where they were invoked:
syncPosition()
filterUpdateBroadcast()
updatePosition()
Even after coding this myself, it's still somewhat confusing; so, let's look at a quick rundown of the various functions to see where they were defined and where they were invoked:
syncPosition()
- Defined: Server-side
- Invoked: Client-side
filterUpdateBroadcast()
- Defined: Server-side
- Invoked: Server-side
updatePosition()
- Defined: Client-side
- Invoked: Server-side
发表评论
-
coffeescript+prototypejs使编写nodejs更象ruby-like
2011-12-21 12:01 1613首先安装prototype for nodejs 引用npm ... -
Underscore.js与nodejs相结合
2011-12-14 11:18 10476今天发现这个Underscore.js,文档说 http:// ... -
NowJS and Reconnects
2011-12-14 09:03 1159NowJS and Reconnects 保留 原文http: ... -
Nodejs中的EventEmitter
2011-12-14 04:57 26836EventEmitter是nodejs核心的一部分。很多nod ... -
nodejs+nowjs实现聊天室
2011-12-13 05:05 9488支持多房间,支持私聊,使用nowjs库,服务器端代码不到100 ... -
nowjs和nodejs结合的简单示例
2011-12-10 07:55 2728功能:把服务器端的时间new Date().getTime() ... -
nodejs运行coffeescript
2011-12-10 03:05 2775首先安装coffee-script 引用npm install ... -
用socket.io实现WebSocket的一个简单例子
2011-12-07 10:47 40060用socket.io实现WebSocket的一个简单例子 客 ...
相关推荐
如果一个块落下的值加上水平或垂直块序列的值等于 7,那么下落的块和该块序列将消失。 这些方块上方的任何方块都会掉落并且可能会触发连击。 7 的块本身不会清除,因为总和中必须涉及 2 个或更多块。 这个规则只有...
通过Web应用程序轻松构建vimrc为什么构建vimrc文件应该并不困难。 毕竟,您要配置的代码编辑器是1991年发明的。 没关系,您的经验水平是不变的,总有新的方法可以改变vim的经验,但是由于提示分散在Internet上,因此...
【NLP 66、实践 ⑰ 基于Agent + Prompt优化进行文章优化】
无
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
# 【tokenizers-***.jar***文档.zip】 中包含: ***文档:【tokenizers-***-javadoc-API文档-中文(简体)版.zip】 jar包下载地址:【tokenizers-***.jar下载地址(官方地址+国内镜像地址).txt】 Maven依赖:【tokenizers-***.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【tokenizers-***.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【tokenizers-***-sources.jar下载地址(官方地址+国内镜像地址).txt】 # 本文件关键字: tokenizers-***.jar***文档.zip,java,tokenizers-***.jar,ai.djl.huggingface,tokenizers,***,ai.djl.engine.rust,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,djl,huggingface,中文API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压 【tokenizers-***.jar***文档.zip】,再解压其中的 【tokenizers-***-javadoc-API文档-中文(简体)版.zip】,双击 【index.html】 文件,即可用浏览器打开、进行查看。 # 特殊说明: ·本文档为人性化翻译,精心制作,请放心使用。 ·只翻译了该翻译的内容,如:注释、说明、描述、用法讲解 等; ·不该翻译的内容保持原样,如:类名、方法名、包名、类型、关键字、代码 等。 # 温馨提示: (1)为了防止解压后路径太长导致浏览器无法打开,推荐在解压时选择“解压到当前文件夹”(放心,自带文件夹,文件不会散落一地); (2)有时,一套Java组件会有多个jar,所以在下载前,请仔细阅读本篇描述,以确保这就是你需要的文件; # Maven依赖: ``` <dependency> <groupId>ai.djl.huggingface</groupId> <artifactId>tokenizers</artifactId> <version>***</version> </dependency> ``` # Gradle依赖: ``` Gradle: implementation group: 'ai.djl.huggingface', name: 'tokenizers', version: '***' Gradle (Short): implementation 'ai.djl.huggingface:tokenizers:***' Gradle (Kotlin): implementation("ai.djl.huggingface:tokenizers:***") ``` # 含有的 Java package(包): ``` ai.djl.engine.rust ai.djl.engine.rust.zoo ai.djl.huggingface.tokenizers ai.djl.huggingface.tokenizers.jni ai.djl.huggingface.translator ai.djl.huggingface.zoo ``` # 含有的 Java class(类): ``` ai.djl.engine.rust.RsEngine ai.djl.engine.rust.RsEngineProvider ai.djl.engine.rust.RsModel ai.djl.engine.rust.RsNDArray ai.djl.engine.rust.RsNDArrayEx ai.djl.engine.rust.RsNDArrayIndexer ai.djl.engine.rust.RsNDManager ai.djl.engine.rust.RsSymbolBlock ai.djl.engine.rust.RustLibrary ai.djl.engine.rust.zoo.RsModelZoo ai.djl.engine.rust.zoo.RsZooProvider ai.djl.huggingface.tokenizers.Encoding ai.djl.huggingface.tokenizers.HuggingFaceTokenizer ai.djl.huggingface.tokenizers.HuggingFaceTokenizer.Builder ai.djl.hu
人形机器人产业的发展需要人工智能、高端制造、新材料等先进技术的协同创新和突破。
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
开关电源的尖峰干扰及其抑制.zip
房地产培训 -新进业务员压马路市调培训.ppt
内容概要:本文探讨了基于MATLAB平台的虚拟电厂优化调度方法,特别关注电转气(P2G)协同、碳捕集技术和垃圾焚烧的应用。文中介绍了虚拟电厂的概念及其重要性,详细解释了碳捕集、需求响应和电转气协同调度的关键技术,并展示了如何使用MATLAB和CPLEX求解器进行优化调度的具体步骤。通过定义决策变量、构建目标函数和设定约束条件,最终实现了多目标优化,即经济性最优和碳排放最低。此外,还讨论了一些常见的代码实现技巧和潜在的问题解决方案。 适合人群:从事能源管理和优化调度研究的专业人士,尤其是那些熟悉MATLAB编程和优化算法的人士。 使用场景及目标:适用于希望深入了解虚拟电厂运作机制和技术实现的研究人员和工程师。主要目标是通过优化调度提高能源利用效率,减少碳排放,降低成本。 其他说明:文章提供了详细的代码片段和理论分析,有助于读者更好地理解和复现实验结果。同时,强调了在实际应用中需要注意的一些细节问题,如约束条件的平衡、求解器配置等。
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
# 【spring-ai-pinecone-store-1.0.0-M7.jar中文-英文对照文档.zip】 中包含: 中文-英文对照文档:【spring-ai-pinecone-store-1.0.0-M7-javadoc-API文档-中文(简体)-英语-对照版.zip】 jar包下载地址:【spring-ai-pinecone-store-1.0.0-M7.jar下载地址(官方地址+国内镜像地址).txt】 Maven依赖:【spring-ai-pinecone-store-1.0.0-M7.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【spring-ai-pinecone-store-1.0.0-M7.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【spring-ai-pinecone-store-1.0.0-M7-sources.jar下载地址(官方地址+国内镜像地址).txt】 # 本文件关键字: spring-ai-pinecone-store-1.0.0-M7.jar中文-英文对照文档.zip,java,spring-ai-pinecone-store-1.0.0-M7.jar,org.springframework.ai,spring-ai-pinecone-store,1.0.0-M7,org.springframework.ai.vectorstore.pinecone,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,springframework,spring,ai,pinecone,store,中文-英文对照API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压 【spring-ai-pinecone
内容概要:本文详细介绍了如何使用MATLAB及其优化工具箱,通过混合整数规划(MILP)方法对微网电池储能系统的容量进行优化配置。主要内容包括定义目标函数(如最小化运行成本),设置约束条件(如充放电功率限制、能量平衡约束),并引入决策变量(如电池容量、充放电功率和状态)。文中提供了具体的MATLAB代码示例,演示了如何将实际问题转化为数学模型并求解。此外,还讨论了一些实用技巧,如避免充放电互斥冲突、考虑电池寿命损耗等。 适用人群:从事微电网设计与运维的技术人员,尤其是那些希望通过优化算法提高系统性能和经济效益的专业人士。 使用场景及目标:适用于需要确定最佳电池储能容量的微电网项目,旨在降低总体运行成本,提高系统的稳定性和可靠性。具体应用场景包括工业园区、商业建筑或其他分布式能源系统。 其他说明:文章强调了模型的实际应用价值,并指出通过精确控制充放电策略可以显著减少不必要的容量闲置,从而节省大量资金。同时提醒读者注意模型的时间粒度选择、电池退化成本等因素的影响。
# 压缩文件中包含: 中文文档 jar包下载地址 Maven依赖 Gradle依赖 源代码下载地址 # 本文件关键字: jar中文文档.zip,java,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,中文API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压最外层zip,再解压其中的zip包,双击 【index.html】 文件,即可用浏览器打开、进行查看。 # 特殊说明: ·本文档为人性化翻译,精心制作,请放心使用。 ·只翻译了该翻译的内容,如:注释、说明、描述、用法讲解 等; ·不该翻译的内容保持原样,如:类名、方法名、包名、类型、关键字、代码 等。 # 温馨提示: (1)为了防止解压后路径太长导致浏览器无法打开,推荐在解压时选择“解压到当前文件夹”(放心,自带文件夹,文件不会散落一地); (2)有时,一套Java组件会有多个jar,所以在下载前,请仔细阅读本篇描述,以确保这就是你需要的文件;
内容概要:本文详细介绍了基于TMS320F28335的光伏离网并网逆变器设计方案,涵盖了从硬件架构到软件控制的各个方面。首先,文章阐述了TMS320F28335作为高性能DSP的优势及其初始化配置方法。其次,探讨了逆变器的数字控制策略,如双闭环控制(电压外环和电流内环)的具体实现方式。然后,深入讲解了SPWM(正弦脉宽调制)技术,包括SPWM波的生成方法和相关代码示例。此外,还讨论了硬件保护逻辑、过流检测、死区时间配置等实际应用中的注意事项。最后,提供了调试经验和学习资源建议。 适合人群:从事光伏逆变器设计、嵌入式系统开发的技术人员,尤其是有一定DSP编程基础的研发人员。 使用场景及目标:适用于需要深入了解光伏逆变器设计原理和技术实现的研究人员和工程师。主要目标是掌握基于TMS320F28335的逆变器控制系统设计,包括数字控制策略和SPWM技术的应用。 其他说明:文中提供的代码示例和实践经验有助于读者更好地理解和应用于实际项目中。建议读者结合TI官方提供的学习资料进行进一步学习和实践。
内容概要:深度学习在医疗影像分析中展现出显著的优势,主要体现在自动特征学习、高准确性和效率、多模态数据融合与综合分析、个性化治疗与预测、减少主观性、处理复杂和高维数据、实时分析与远程医疗支持、数据挖掘与科研突破以及可扩展性与持续优化九个方面。通过卷积神经网络(CNN)、U-Net等模型,深度学习能够自动从影像中提取多层次特征,无需手动干预,在分类、分割任务中表现出色,处理速度远超人工。此外,它还能够整合多源数据,提供全面的诊断依据,实现个性化治疗建议,减少误诊和漏诊,支持实时分析和远程医疗,挖掘病理模式并加速研究,同时具有可扩展性和持续优化的能力。; 适合人群:医疗行业从业者、科研人员、计算机视觉和深度学习领域的研究人员。; 使用场景及目标:①用于医疗影像的自动特征提取和分类,如乳腺癌筛查、皮肤癌诊断等;②整合多模态数据,如CT、MRI等,提高诊断准确性;③提供个性化治疗建议,优化治疗方案;④支持实时分析和远程医疗,尤其适用于偏远地区的急诊场景;⑤挖掘病理模式,加速疾病机制的研究。; 其他说明:深度学习正逐渐成为医疗影像分析的核心诊断伙伴,未来发展方向包括增强可解释性、保护数据隐私和轻量化部署,旨在进一步提升医疗效率和患者护理质量。
内容概要:深度学习是机器学习的一个子领域,通过构建多层次的“深度神经网络”来模拟人脑结构,从而学习和提取数据的复杂特征。文章介绍了深度学习的核心概念,包括神经元、多层感知机、深度神经网络(DNN)、卷积神经网络(CNN)、循环神经网络(RNN)和Transformer等常见网络结构。同时,详细讲解了激活函数、损失函数与优化器的作用。此外,还探讨了深度学习的关键突破,如大数据与算力的支持、正则化技术和迁移学习的应用。文中列举了深度学习在计算机视觉、自然语言处理、语音与音频以及强化学习等领域的应用场景,并指出了其面临的挑战,如数据依赖、计算成本和可解释性问题。最后提供了使用PyTorch和TensorFlow/Keras框架的经典代码示例,涵盖图像分类、文本生成和迁移学习等内容。; 适合人群:对机器学习有一定了解,希望深入学习深度学习理论和技术的研究人员、工程师及学生。; 使用场景及目标:①理解深度学习的基本原理和核心概念;②掌握常见深度学习框架的使用方法,如PyTorch和TensorFlow;③能够根据具体应用场景选择合适的网络结构和算法进行实践。; 其他说明:本文不仅提供了理论知识,还附带了详细的代码示例,便于读者动手实践。建议读者结合理论与实践,逐步深入理解深度学习的各个方面。
适用于理工专业的毕业生,毕业答辩时可供参考,叙述详细准确,可以作为自己答辩PPT的参考
# 【tokenizers-***.jar***文档.zip】 中包含: ***文档:【tokenizers-***-javadoc-API文档-中文(简体)版.zip】 jar包下载地址:【tokenizers-***.jar下载地址(官方地址+国内镜像地址).txt】 Maven依赖:【tokenizers-***.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【tokenizers-***.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【tokenizers-***-sources.jar下载地址(官方地址+国内镜像地址).txt】 # 本文件关键字: tokenizers-***.jar***文档.zip,java,tokenizers-***.jar,ai.djl.huggingface,tokenizers,***,ai.djl.engine.rust,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,djl,huggingface,中文API文档,手册,开发手册,使用手册,参考手册 # 使用方法: 解压 【tokenizers-***.jar***文档.zip】,再解压其中的 【tokenizers-***-javadoc-API文档-中文(简体)版.zip】,双击 【index.html】 文件,即可用浏览器打开、进行查看。 # 特殊说明: ·本文档为人性化翻译,精心制作,请放心使用。 ·只翻译了该翻译的内容,如:注释、说明、描述、用法讲解 等; ·不该翻译的内容保持原样,如:类名、方法名、包名、类型、关键字、代码 等。 # 温馨提示: (1)为了防止解压后路径太长导致浏览器无法打开,推荐在解压时选择“解压到当前文件夹”(放心,自带文件夹,文件不会散落一地); (2)有时,一套Java组件会有多个jar,所以在下载前,请仔细阅读本篇描述,以确保这就是你需要的文件; # Maven依赖: ``` <dependency> <groupId>ai.djl.huggingface</groupId> <artifactId>tokenizers</artifactId> <version>***</version> </dependency> ``` # Gradle依赖: ``` Gradle: implementation group: 'ai.djl.huggingface', name: 'tokenizers', version: '***' Gradle (Short): implementation 'ai.djl.huggingface:tokenizers:***' Gradle (Kotlin): implementation("ai.djl.huggingface:tokenizers:***") ``` # 含有的 Java package(包): ``` ai.djl.engine.rust ai.djl.engine.rust.zoo ai.djl.huggingface.tokenizers ai.djl.huggingface.tokenizers.jni ai.djl.huggingface.translator ai.djl.huggingface.zoo ``` # 含有的 Java class(类): ``` ai.djl.engine.rust.RsEngine ai.djl.engine.rust.RsEngineProvider ai.djl.engine.rust.RsModel ai.djl.engine.rust.RsNDArray ai.djl.engine.rust.RsNDArrayEx ai.djl.engine.rust.RsNDArrayIndexer ai.djl.engine.rust.RsNDManager ai.djl.engine.rust.RsSymbolBlock ai.djl.engine.rust.RustLibrary ai.djl.engine.rust.zoo.RsModelZoo ai.djl.engine.rust.zoo.RsZooProvider ai.djl.huggingface.tokenizers.Encoding ai.djl.huggingface.tokenizers.HuggingFaceTokenizer ai.djl.huggingface.tokenizers.HuggingFaceTokenizer.Builder ai.djl.hu