`

Create, read and edit .zip files with Javascript

 
阅读更多

JSZip


Create, read and edit .zip files with Javascript

How?

Why?

  1. JavaScript today is capable of generating a lot of data. The easiest way to deliver multiple files to your users is in a zip file. Instead of wasting server resources and bandwidth you can get the client to do it for you.
  2. Because it's cool!

Where?

Download from Github

See also: the test suite


Tell me more!

Browser support

Opera Firefox Safari Chrome Internet Explorer
Yes Yes Yes Yes Yes
Tested with the latest version Tested with 3.0 / 3.6 / latest version Tested with the latest version Tested with the latest version Tested with IE 6 / 7 / 8 / 9 / 10

While JSZip should work everywhere, the tricky part is to give the zip file to the user.

Browser support for data URI scheme with zip

Opera Firefox Safari Chrome Internet Explorer
7.5+ 3.0+ Yes Yes No
Filename is "default.zip" Filename is random alphanumeric with ".part" extension Filename is "Unknown" (no extension) Filename is "download.zip" on OSX and Linux, and just "download" on Windows (issue #9) Only supports data URLs for some content. (May be able to use MHTML?)

Filename problems

The biggest issue with JSZip is that the filenames are very awkward, Firefox generates filenames such as a5sZQRsx.zip.part (see bugs 367231 and 532230), and Safari isn't much better with just Unknown. Sadly there is no pure Javascript solution (and working in every browsers) to this. However...

Solution-ish: Downloadify

Downloadify uses a small Flash SWF to download files to a user's computer with a filename that you can choose. Doug Neiner has added the dataType option to allow you to pass a zip for downloading. Follow the Downloadify demo with the following changes:

zip = new JSZip();
zip.add("Hello.", "hello.txt");
Downloadify.create('downloadify',{
...
  data: function(){
    return zip.generate();
  },
...
  dataType: 'base64'
});

Other solution-ish: Blob URL

With some recent browsers come a new way to download Blobs (a zip file for example) : blob urls. The download attribute on <a> allows you to give the name of the file. Blob urls start to be widely supported but this attribute is currently only supported in Chrome and Firefox (>= 20). See the example.

var blob = zip.generate({type:"blob"});
myLink.href = window.URL.createObjectURL(blob);
myLink.download = "myFile.zip";

Usage with Google Gears

Franz Buchinger has written a brilliant tutorial on using JSZip with Google Gears (part 2). If you want to let your Gears users download several files at once I really recommend having a look at some of his examples.

Reading a zip file from an ajax call

When doing an ajax call to get the binary data, the browser will try to interpret the binary as text, corrupting it. The solution is to set the mimetype to 'text/plain; charset=x-user-defined'. This solution works well in all browsers but IE. If you need IE support, please see what is done in the file test/index.html.

An other solution is to use a modern browser (supporting xhr2) : setting xhr.type = 'arraybuffer'; will do the trick, JSZip supports ArrayBuffers. Please see the example.

Reading a local zip file (File API)

JSZip supports (if available in the browser) the File API : reading a local zip file is simple : new JSZip(readerEvent.target.result);. Please see the complete example for more details.

Documentation

new JSZip()

Description :
The default constructor.
Returns :
A new JSZip.

new JSZip(data [,options])

Description :
Create a new JSZip file and load an existing zip file. See the documentation of load() for more details and this for the limitations.
Parameters :
data (same types as load()) the content of the zip file to load.
options (Object) options to pass to the load() method..
Returns :
A new JSZip.
new JSZip(zipDataFromXHR, {base64:false});
// same as
var zip = new JSZip();
zip.load(zipDataFromXHR, {base64:false});

file(name)

Description :
Get a file with the specified name.
Parameters :
name (String) the name of the file.
Returns :
The file if any, null otherwise. The file has the following structure :
var zip = new JSZip();
zip.file("file.txt", "content");

zip.file("file.txt").name // "file.txt"
zip.file("file.txt").data // "content"
zip.file("file.txt").options.dir // false

// utf8 example
var zip = new JSZip(zipFromAjaxWithUTF8);
zip.file("amount.txt").data // "€15" 
zip.file("amount.txt").asText() // "€15"
zip.file("amount.txt").asArrayBuffer() // an ArrayBuffer containing €15
zip.file("amount.txt").asUint8Array() // an Uint8Array containing €15

file(regex)

Description :
Search a file in the current folder and subfolders with a regular expression. The regex is tested against the relative filename.
Parameters :
regex (RegExp) the regex to use.
Returns :
An array of matching files (an empty array if none matched).
var zip = new JSZip();
zip.file("file1.txt", "content");
zip.file("file2.txt", "content");

zip.file(/file/); // array of size 2

// example with a relative path :
var folder = zip.folder("sub");
folder
  .file("file3.txt", "content")  // relative path from folder : file3.txt
  .file("file4.txt", "content"); // relative path from folder : file4.txt

folder.file(/file/);  // array of size 2
folder.file(/^file/); // array of size 2, the relative paths start with file

// arrays contain objects in the form:
// {name: "file2.txt", data: "content", dir: false}

file(name, data [,options])

Description :
Add a file to the zip file.
Parameters :
name (String) the name of the file.
data (String/ArrayBuffer/Uint8Array) the content of the file.
options (Object) the options :
  • base64 (boolean) set to true if the data is base64 encoded. For example image data from a <canvas> element. Plain text and HTML do not need this option.
  • binary (boolean) defaults to true if the data is base64 encoded, false otherwise. If set to false then UTF-8 characters will be encoded. If the data is an ArrayBuffer or an Uint8Array, this will be set to true.
  • date (Date) use it to specify the last modification date. If not set the current date is used.
  • optimizedBinaryString (boolean), default false. Set it to true if (and only if) the input has already been prepared with a 0xFF mask.
Returns :
A JSZip object, for chaining.
zip.add("Hello.txt", "Hello World\n");
zip.add("smile.gif", "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=", {base64: true});
zip.add("magic.txt", "U2VjcmV0IGNvZGU=", {base64: true, binary: false});
zip.add("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")});
zip.add("folder/file.txt", "file in folder");

zip.add("animals.txt", "dog,platypus\n").add("people.txt", "james,sebastian\n");

// result : Hello.txt, smile.gif, magic.txt, Xmas.txt, animals.txt, people.txt,
// folder/, folder/file.txt

folder(name)

Description :
Add a directory to the zip file.
Parameters :
name (String) the name of the directory.
Returns :
a new JSZip (for chaining), with the new folder as root.
zip.folder("images");
zip.folder("css").add("style.css", "body {background: #FF0000}");
// or specify an absolute path (using forward slashes)
zip.add("css/font.css", "body {font-family: sans-serif}")

// result : images/, css/, css/style.css, css/font.css

folder(regex)

Description :
Search a subdirectory.
Search a subdirectory in the current directory with a regular expression. The regex is tested against the relative path.
Parameters :
regex (RegExp) the regex to use.
Returns :
An array of matching folders (an empty array if none matched).
var zip = new JSZip();
zip.folder("home/Pierre/videos");
zip.folder("home/Pierre/photos");
zip.folder("home/Jean/videos");
zip.folder("home/Jean/photos");

zip.folder(/videos/); // array of size 2

zip.folder("home/Jean").folder(/^vid/); // array of 1

remove(name)

Delete a file or folder.

Description :
Delete a file or folder (recursively).
Parameters :
name (String) the name of the file/folder to delete.
Returns :
The current JSZip object.
var zip = new JSZip();
zip.add("Hello.txt", "Hello World\n");
zip.add("temp.txt", "nothing").remove("temp.txt");
// result : Hello.txt

zip.folder("css").add("style.css", "body {background: #FF0000}");
zip.remove("Hello.txt").remove("css");
//result : empty zip

generate(options)

Description :
Generates the complete zip file.
Parameters :
options (Object) the options to generate the zip file :
  • base64 (boolean) deprecated, use "type" instead. false to get the result as a raw byte string. Default : true, encode as base64.
  • compression (String) the compression method to use. "STORE" (no compression) by default, you can use "DEFLATE" (include the file jszip-deflate.js) or write your own.
  • type (String) the type of zip to return. The possible values are :
    • base64 (default) : the result will be a string, the binary in a base64 form.
    • string : the result will be a string in "binary" form, 1 byte per char.
    • uint8array : the result will be a Uint8Array containing the zip. This requires a compatible browser.
    • arraybuffer : the result will be a ArrayBuffer containing the zip. This requires a compatible browser.
    • blob : the result will be a Blob containing the zip. This requires a compatible browser.
Returns :
The generated zip file.
HTML5 note : when using type = "uint8array", "arraybuffer" or "blob", be sure to check if the browser supports it (you can use JSZip.support). This method will throw an exception otherwise.
content = zip.generate();
location.href="data:application/zip;base64,"+content;
content = zip.generate({type:"string"});
for (var c = 0; c < content.length; c++) {
    console.log(content.charCodeAt(c));
    // do other things
}

load(data, options)

Description :
Read an existing zip and merge the data in the current JSZip object. The implementation is in jszip-load.js, don't forget to include it. This technique has some limitations, see below.
Parameters :
data (String/ArrayBuffer/Uint8Array) the zip file
options (Object) the options to load the zip file :
  • base64 (boolean) true if the data is base64 encoded, false for binary. Default : false.
  • checkCRC32 (boolean) true if the read data should be checked against its CRC32. Default : false.
Returns :
The current JSZip object.
var zip = new JSZip();
zip.load(zipDataFromXHR);
Zip features supported by this method
  • Compression (DEFLATE with jszip-deflate.js)
  • zip with data descriptor
  • ZIP64
  • UTF8 in file name, UTF8 in file content
Zip features not (yet) supported
  • password protected zip
  • multi-volume zip

filter(predicate)

Description :
Filter nested files/folders with the specified function.
Parameters :
predicate (function) the predicate to use : function (relativePath, file) {...} It takes 2 arguments : the relative path and the file.
  • relativePath (String) The filename and its path, reliatively to the current folder.
  • file (Object) The file being tested. Like the result of file(name), the file has the form {name:"...", data:"...", options:{...}}.
  • Return true if the file should be included, false otherwise.
Returns :
An array of matching elements.
var zip = new JSZip().folder("dir");
zip.file("readme.txt", "content");
zip.filter(function (relativePath, file){
  // relativePath == "readme.txt"
  // file = {name:"dir/readme.txt",data:"content",options:{...}}
  return true/false;
});

JSZip.support

If the browser supports them, JSZip can take advantage of some new features : ArrayBuffer, Blob, Uint8Array. To know if JSZip can use them, you can check the JSZip.support object. It contains the following properties :

  • arraybuffer : true if JSZip can read and generate ArrayBuffer, false otherwise.
  • uint8array : true if JSZip can read and generate Uint8Array, false otherwise.
  • blob : true if JSZip can read and generate Blob, false otherwise.

Loading zip files, limitations

All the features of zip files are not supported. Classic zip files will work but encrypted zip, multi-volume, etc are not supported and the load() method will throw an Error.

ZIP64 files can be loaded, but only if the zip file is not "too big". ZIP64 uses 64bits integers but Javascript represents all numbers as 64-bit double precision IEEE 754 floating point numbers (see section 8.5). So, we have 53bits for integers and bitwise operations treat everything as 32bits. So if all the 64bits integers can fit into 32 bits integers, everything will be fine. If it's not the case, you will have other problems anyway (see next limitation).

An other limitation comes from the browser (and the machine running the browser). A compressed zip file of 10M is common and easily opened by desktop application, but not in a browser. The processing of such a beast is likely to be painful : the browser will eat hundreds of megabytes while using CPU like never.
If you use an old browser, things will be worse. For example, IE6 and IE7 are quite slow to to execute the unit tests, and they completely freeze as soon as they try to handle larger files.
Conclusion : reading small files is OK, reading others is not.

Reading and generating a zip file won't give you back the same file. Some data are discarded (file metadata) and other are added (subfolders).

Changelog

1.0.1 2013-03-04

  • Fixed an issue when generating a compressed zip file with empty files or folders, see #33.
  • With bad data (null or undefined), asText/asBinary/asUint8Array/asArrayBuffer methods now return an empty string, see #36.

1.0.0 2013-02-14

First release after a long period without version.

分享到:
评论

相关推荐

    UE(官方下载)

    Steps to record and edit powerful macros to quickly and efficiently edit files Using "copied" and "selected" variables for dynamic macros Use copied and selected text in macros to dramatically ...

    cuteEditor6.0

    多语言支持,通过简单设置XML即可完成 (Demo) &lt;br/&gt;All labels, buttons, tooltips and messages are located in external XML files, so that the language of the editor can be switched with a single...

    flash标签云 3D效果 PHP插件 by weefselkweekje

    * The plugin requires Flash Player 9 or better and javascript. Please make sure you have both. * There have been some cases where WordPress' Automatic Plugin Upgrade feature breaks the plugin. After ...

    Java 学习内容和先后顺序.txt

    java 学习 Java 可以按照以下的步骤和内容进行,这样可以帮助你系统地掌握这门语言,并为进一步的学习打下坚实的基础。以下是建议的学习路径: 1. **Java 基础知识** - 了解 Java 的历史和它为什么被创建。 - 安装 JDK(Java Development Kit)和设置环境变量。 - 学习如何编写、编译和运行第一个 Java 程序。 - 掌握基本语法:变量、数据类型、运算符等。 2. **控制流程语句** - 学习条件语句(if-else, switch)。 - 循环结构(for, while, do-while)。 - 控制循环执行(break, continue)。 3. **面向对象编程基础** - 类与对象的概念。 - 方法和属性。 - 构造函数。 - 封装、继承、多态和抽象的基本概念。 4. **深入面向对象编程** - 抽象类和接口的区别及使用场景。 - 包和访问修饰符。 - 异常处理机制(try-catch-finally, 自定义异常)。 5. **集合框

    【编码解码】基于matlab罗利衰落信道编解码器设计【含Matlab源码 9930期】.mp4

    海神之光上传的视频是由对应的完整代码运行得来的,完整代码皆可运行,亲测可用,适合小白; 1、从视频里可见完整代码的内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作

    测试上传时间时间,发布时间是否等于公布时间

    测试上传时间时间,发布时间是否等于公布时间

    基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明

    【资源介绍】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,也可以作为小白实战演练和初期项目立项演示的重要参考借鉴资料。 3、本资源作为“学习资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研和多多调试实践。 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip 基于卷积神经网络(CNN)和CIFAR10数据集的图像智能分类 Web 应用新版源码+说明.zip

    【Python毕设】p103基于Flask的豆瓣电影情感分析推荐系统-spider+vue.zip

    python3.8+flask+spider+mysql5.7+vue 基于Python的豆瓣电影NLP情感分析与协同过滤算法结合的推荐系统,旨在为用户提供个性化的电影推荐服务。该系统首先利用自然语言处理(NLP)技术对豆瓣电影评论进行情感分析,从中提取用户对电影的情感倾向,进而为后续的推荐算法提供更为丰富的用户偏好信息。 系统的核心模块包括数据采集、情感分析、用户画像构建和推荐算法实现。通过爬虫技术获取豆瓣电影及其评论数据,使用Python的NLP库(如NLTK和spaCy)进行情感分类和词频分析,构建用户情感画像。基于这些画像,结合协同过滤算法(包括基于用户和基于物品的推荐方法),实现高效的电影推荐。实验结果表明,采用情感分析的推荐系统相较于传统基于评分的推荐系统,能够显著提高用户的满意度和推荐准确率。

    基于协同过滤推荐算法的音乐推荐系统:Python+Django开发,SQLite数据库支持,MVC框架构建,解压即运行,含配套文档,基于协同过滤推荐算法的音乐推荐系统:Python+Django开发

    基于协同过滤推荐算法的音乐推荐系统:Python+Django开发,SQLite数据库支持,MVC框架构建,解压即运行,含配套文档,基于协同过滤推荐算法的音乐推荐系统:Python+Django开发,SQLite数据库支持,MVC框架,解压即运行,含配套文档,音乐推荐系统 系统算法:基于用户的协同过滤推荐算法 编程语言:python 数据库:sqlite 框架:MVC web应用框架:Django 解压就可以运行(自己需要有调试项目环境的能力),需要软件python和pycharm或者Anaconda 项目有配套的文档 ,音乐推荐系统;基于用户的协同过滤推荐算法;Python;SQLite;MVC框架;Django;解压即运行;项目文档,基于MVC框架的Python音乐推荐系统:Django框架下使用SQLite数据库的协同过滤算法应用

    java-springboot+vue增强可视化的广州IT招聘系统设计与实现-说明文档-演示视频.zip

    管理员进入主页面,主要功能包括对用户管理、广州招聘管理、交流论坛、系统管理、我的信息等进行操作。

    社区治理智能化信息平台解决方案.pptx

    社区治理智能化信息平台解决方案.pptx

    数据驱动物流智慧化:Python实现物流数据挖掘、爬取与分析的研究思路及系统化实践,探索Python在物流数据挖掘项目中的应用-数据爬取、可视化与系统实现研究,数据挖掘项目python-物流数据的

    数据驱动物流智慧化:Python实现物流数据挖掘、爬取与分析的研究思路及系统化实践,探索Python在物流数据挖掘项目中的应用——数据爬取、可视化与系统实现研究,数据挖掘项目python--物流数据的爬取与分析 研究思路:数据爬取+可视化+系统实现 包含内容:数据集文档代码 ,数据挖掘项目;物流数据爬取;数据可视化;系统实现;数据集文档代码,Python物流数据挖掘项目:爬取、分析与系统实现

    基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明)

    【资源介绍】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,也可以作为小白实战演练和初期项目立项演示的重要参考借鉴资料。 3、本资源作为“学习资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研和多多调试实践。 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip 基于度量学习分类器的人脸识别系统(深度学习matlab源码+说明).zip

    基于Matlab Simulink的电机FOC观测器模型:龙贝格观测器结合PLL无传感器控制及PMSM模型精准估算转子位置信息,Matlab Simulink下电机FOC观测器模型:结合龙贝格观测器与

    基于Matlab Simulink的电机FOC观测器模型:龙贝格观测器结合PLL无传感器控制及PMSM模型精准估算转子位置信息,Matlab Simulink下电机FOC观测器模型:结合龙贝格观测器与PLL的无传感器控制策略,高精度估算转子位置与反电势,matlab simulink电机foc观测器模型,采用龙贝格观测器+PLL进行无传感器控制,其利用 PMSM 数学模型构造观测器模型,根据输出的偏差反馈信号来修正状态变量。 当观测的电流实现与实际电流跟随时,利用估算的反电势进行pll计算转子位置信息。 龙伯格观测器采用线性控制策略代替了 SMO 的变结构控制,有效避免了系统抖振,动态响快、估算精度高的优点。 ,MATLAB; Simulink电机; FOC观测器模型; 龙贝格观测器; PLL无传感器控制; PMSM数学模型; 输出偏差反馈; 状态变量修正; 估算反电势; PLL转子位置; 线性控制策略; SMO变结构控制; 系统抖振; 动态响应; 估算精度。,MATLAB Simulink电机FOC观测器模型:龙贝格观测器+PLL无传感器控制技术

    力士乐变频器调试软件RDwin11V09英文版功能解析与应用指南,力士乐变频器调试软件RDwin11V09英文版使用指南,力士乐变频器调试软件RDwin11V09,只有英文版的 ,关键词:力士乐变频器

    力士乐变频器调试软件RDwin11V09英文版功能解析与应用指南,力士乐变频器调试软件RDwin11V09英文版使用指南,力士乐变频器调试软件RDwin11V09,只有英文版的 ,关键词:力士乐变频器;调试软件;RDwin11V09;英文版;调试;变频器软件。,力士乐RDwin11V09变频器英文版调试软件使用指南

    FPGA高效实现CAN通信:基于SJA1000的8字节传输与动态发送ID控制代码测试报告,FPGA驱动CAN通信:SJA1000代码实现固定8字节传输与动态发送ID控制,经测试稳定可靠的数据收发系统

    FPGA高效实现CAN通信:基于SJA1000的8字节传输与动态发送ID控制代码测试报告,FPGA驱动CAN通信:SJA1000代码实现固定8字节传输与动态发送ID控制,经测试稳定可靠的数据收发系统,FPGA实现CAN通信,SJA1000 FPGA代码,接收和发送支持固定8字节,发送ID可受逻辑控制,已测试收发数据均正常且稳定,测试过程:串口接收数据通过CAN口发送出去,CAN口接收数据通过串口发送出去。 ,FPGA; CAN通信; SJA1000; FPGA代码; 接收; 发送; 8字节; 发送ID控制; 测试; 串口; CAN口,FPGA CAN通信实现:SJA1000代码支持8字节固定传输,收发稳定

    基于RF算法的多变量时间序列预测外部工具箱-轻松运行于Windows 64位系统的Matlab代码(版本2018B及以上),基于随机森林算法的RF多变量时间序列预测外部工具箱:Matlab代码与Wi

    基于RF算法的多变量时间序列预测外部工具箱——轻松运行于Windows 64位系统的Matlab代码(版本2018B及以上),基于随机森林算法的RF多变量时间序列预测外部工具箱:Matlab代码与Windows 64位系统兼容的便捷解决方案,基于随机森林(RF)算法的多变量时间序列预测 外部工具箱 RF多变量时间序列 matlab代码 注:暂无Matlab版本要求 -- 推荐 2018B 版本及以上 注:采用 RF 工具箱(无需安装,可直接运行),仅支持 Windows 64位系统 ,随机森林(RF)算法; 外部工具箱; 时间序列预测; Matlab代码; Windows 64位系统。,基于RF算法的Matlab多变量时间序列预测工具箱

    java-springboot+vue基于Hadoop的大数据的电脑硬件推荐系统-说明文档-演示视频.zip

    管理员登录系统后,可以对价格区间管理、用户管理、品牌管理、笔记本管理、电脑主机管理、电脑外设管理、硬件组装管理、电脑信息管理及系统管理等功能进行相应操作

    SymPy Python库:高级主题-自定义模块开发与社区贡献指南

    内容概要:本文介绍了SymPy这一用于符号数学计算的Python库的高级主题,主要包括自定义模块开发和贡献指南。首先是SymPy的基础安装与核心功能回顾,包括符号计算、方程求解、矩阵运算和符号积分等。之后深入探讨了如何理解和扩展SymPy模块结构,以及具体步骤指导如何开发自定义模块和提交贡献。对于希望深入了解和参与SymPy开发的用户而言,这是不可或缺的知识储备。 适合人群:具备一定编程基础并对数学计算有兴趣的研发人员,特别是那些想通过自定义模块丰富数学计算工具箱的技术爱好者和研究人员。 使用场景及目标:适用于想要扩展数学符号计算能力和贡献社区的个体或团队;目标在于利用SymPy实现更高层次的抽象数学问题,通过代码改进优化已有功能,并促进开放源代码生态系统发展。 其他说明:文档还包括详细的贡献流程和代码规范说明,旨在帮助开发者更好地理解如何参与到SymPy这样的大型开源项目中。同时强调了良好的文档写作习惯对社区交流的重要性。

    基于Verilog开发的FPGA密码锁工程:键盘输入、密码修改与验证及仿真模块,基于Verilog的FPGA密码锁工程:键盘输入,密码修改与验证,含仿真模块,Quartus与Vivado版本,基于Ve

    基于Verilog开发的FPGA密码锁工程:键盘输入、密码修改与验证及仿真模块,基于Verilog的FPGA密码锁工程:键盘输入,密码修改与验证,含仿真模块,Quartus与Vivado版本,基于Verilog 语言开发的FPGA密码锁工程。 通过矩阵键盘输入按键值。 输入12修改密码,13清除密码,可以修改原来默认的密码,修改时首先要输入当前密码进行验证,正确后才能更新当前密码,否则修改不成功。 修改结束后按键15,确认修改成功。 也直接使用默认密码作为最终密码使用。 按键14,进入开锁阶段之后,输入密码进行开锁。 有两个版本,分别为Quartus 和vivado 两个版本。 工程均带有完整的仿真模块。 前两张图为一个简单文档说明。 最后两张图为quartus的仿真图。 ,Verilog开发;FPGA密码锁工程;矩阵键盘输入;密码修改与验证;确认键操作;开锁功能;Quartus版本;Vivado版本;仿真模块;文档说明;Quartus仿真图。,基于Verilog的FPGA密码锁工程:双版本(Quartus & Vivado)矩阵键盘输入安全锁具

Global site tag (gtag.js) - Google Analytics