malformed input off : 1, length : 1

### Java 中处理 Malformed Input Exception 当遇到 `MalformedInputException` 错误时,通常是因为程序尝试读取或解码不符合预期编码格式的数据。对于指定的异常情况 "off 1 length 1",这表明在偏移量为1的位置上有一个长度为1的非法字节序列。 为了有效处理此类异常,在Java中可以采取以下措施: #### 使用替代字符替换非法字符 通过设置InputStreamReader中的CharsetDecoder参数来定义如何处理不合法的输入数据[^2]: ```java import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CodingErrorAction; // 创建带有自定义错误处理行为的解码器 Charset charset = Charset.forName("UTF-8"); CharsetDecoder decoder = charset.newDecoder(); decoder.onMalformedInput(CodingErrorAction.REPLACE); decoder.replaceWith(String.valueOf((char) 65533)); // 替换符U+FFFD (�) try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, decoder))) { String line; while ((line = reader.readLine()) != null) { System.out.println(line); } } ``` #### 设置默认字符集并捕获异常 另一种方法是在读取文件之前设定系统的默认字符集,并确保在整个应用程序范围内一致地应用它。同时可以在适当的地方捕捉到可能发生的`MalformedInputException`异常[^3]: ```java System.setProperty("file.encoding", "UTF-8"); try { byte[] bytes = {-1}; // 不合法的 UTF-8 字节数组 String str = new String(bytes, StandardCharsets.UTF_8); } catch (IllegalArgumentException e){ // 处理 MalformedInputException 或其他 IllegalArgumentExceptions System.err.println("Invalid character encountered."); } ``` 上述两种方式都可以有效地防止因恶意或意外损坏的数据而导致的应用崩溃问题。选择哪种取决于具体应用场景的需求以及对性能的影响考量。

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

Python内容推荐

【Trans论文复现】基于Agent的电力市场深度决策梯度(深度强化学习)算法建模研究(Python代码实现)

【Trans论文复现】基于Agent的电力市场深度决策梯度(深度强化学习)算法建模研究(Python代码实现)

内容概要:本文围绕《【Trans论文复现】基于Agent的电力市场深度决策梯度(深度强化学习)算法建模研究(Python代码实现)》展开,系统阐述了如何基于深度强化学习中的深度决策梯度方法,构建多智能体(Agent)参与的电力市场竞争模型。研究深入剖析了算法的理论基础、多智能体环境建模过程、训练机制设计以及在电力市场竞价环境下的应用逻辑,旨在实现市场主体在复杂动态环境中的最优 bidding 策略。文章结合Python编程语言,完成了从环境构建、奖励函数设计、策略网络实现到模型训练与仿真的全流程代码实现,通过仿真验证了该方法在自主决策与长期策略优化方面的有效性与先进性。; 适合人群:具备一定Python编程基础和机器学习、强化学习基础知识,对电力市场运行机制、多智能体博弈或深度强化学习在能源系统中应用感兴趣的科研人员、研究生及高年级本科生。; 使用场景及目标:①用于电力市场中发电商或需求侧用户的竞价策略建模与仿真分析;②为研究多智能体系统在非完全信息、动态竞争环境下的博弈行为提供技术参考与开源代码支持;③支持对深度决策梯度算法在策略收敛性、鲁棒性和市场均衡分析等方面的性能评估与二次开发。; 阅读建议:建议读者结合提供的Python代码进行模块化学习,重点关注环境状态与动作空间的定义、奖励函数的经济学含义、Agent策略网络的结构设计及训练流程的实现细节,并可进一步扩展至日前市场、实时市场等多时间尺度场景进行实验验证与模型优化。

使用 Java 实现的压缩/解压 ZIP 文件的工具类

使用 Java 实现的压缩/解压 ZIP 文件的工具类

使用 Java 语言实现并封装的创建 ZIP 格式的压缩文件并解压到指定目录和解压 ZIP 文件到指定目录的工具类。

基于C++实现的迷你数据库.zip

基于C++实现的迷你数据库.zip

本项目的主要命令都参考mysql完成。MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下产品。MySQL 最流行的关系型数据库管理系统,在 WEB 应用方面MySQL是最好的 RDBMS (Relational Database Management System,关系数据库管理系统) 应用软件之一。 详细介绍参考:https://blog.csdn.net/newlw/article/details/132844883

Sakemail

Sakemail

SakEmail components Copyright ?1997 - 2003 Sergio A. Kessler web: http://groups.yahoo.com/group/sakemail/To subscribe to the mailing list of sakemail, just go tohttp://groups.yahoo.com/group/sakemail/History:0.9 - First released version0.9.1b -Fixed when a mail server reply on the connection with more than one line0.9.2b - I forget to return a value in functions retrieveHeader/Message =) and fixed it. Some minor bugs that I don‘t remember fixed.- Added MIME-compliant base64 support (not for use by now). Added examples.0.9.2.1b- Fixed a bug when send a mail and the first line disappear (thanks to Arun)- Now, you could do MySMTP.MsgTo := ‘a@doma.com; b@domb.com;c@domc.com‘; the spaces before/after semicolon doesn‘t matter (I hope ;)).0.9.3b- Many changes, I added a SakMsg component that make send binary attachments a snap. But have one problem, if you send as attach a file > 20 Kb, it doesn‘t work (I don‘t know why, maybe a problem of sockets). Developed with a version 2.0b of WSockets and D3.0.9.3.1b- Changed the POP.login to a function that return the number of new msgs.- Added the event OnRetrieveProgress on the SakPOP, and fixed the example, sorry =)- Minor changes to the code.1.0- Developed with WSockets 1.2 POP.Login now return a boolean depending id the user is authorized, and POP.Init return the number of new msgs.1.01- Fixed a bug with a bounced mail.1.02- Minor bugs fixed (some variants of boundary)14/10/971.1.0- Warning: WSockets1.2 have some bugs that result in bad attachments. So I decided to use the sockets of Delphi 3 founded in D3 c/s D3.01 pro and D3.01 c/s. Now all seems to work fine and much more smooth. And of course the interface of SakEmail hasn‘t changed.26/10/971.2.0- Added the Reply-To field to TSakMsg comp. Now you must use ‘,‘ when you want to send the msg. to multiple recipients, i.e.: ‘a@doma.com, b@domb.com,c@domc.com‘ This change is done for better compatibility with other emails clients.- Better formatting of the field Date of TSakMsg. Some changes to the code.17/11/971.2.1- Now, all searches are made in case-insensitive, it could prevent some unexpected responses (no one reported, but...). Some changes to the code (again).20/11/971.2.2- Some bugs fixed. (Thanks to Serge Wagener from .lu)24/11/971.2.3- Added the field ‘MIME-Version: 1.0‘. It seems that is necessary :)25/11/971.3.0- Added compatibility with SCO and VAX servers. Fixed a minor bug with the boundary.- Change the generator of the message id.- Added the field MessageId and InReplyTo to the TSakMsg component.- Added the field In-Reply-To that is added to the message generated when it is <> ‘‘.30/11/971.3.1- Almost rewrote the parsing code. Now is more easy for you if you want hack/modify the code.- Better treatment of emails with html inside.15/12/971.4- Added support for UUCoded attachments.- Added a small delay when sending the email, seems that some servers can‘t deglut the info too fast, causing problems with sockets buffers and leading to crash the client machine, I don‘t know if is a Borland bug or Microsoft bug. (thanks to Don Higgins).19/12/971.4.1- Fixed a bug that send double ‘<‘ and ‘>‘ (ie. <<ser@dom.com>>) when the full user name is used. Check the new SMTP demo. Thanks to Serge Wagener for locate this bug, track it down and send me the fix.2/2/981.5.0- Added the Canceled property to TSakPOP and to TSakSMTP. Due to this addition now RetrieveAllMessages is a function that return the number of msgs. retrieved and SendMessage is a boolean function (maybe someone has pressed the cancel btn).- Fixed a bug when the subject field is too large.9/2/981.5.1- Fixed a bug with a message within a message (recursive msgs).18/2/981.5.2- Fixed a bug what happens when after the field ‘To:‘ appear a blank line(Thanks to Osvaldo Fillia). Fixed a bug when sending email to more than two address (the separator is still ‘,‘).9/3/981.6.0- Sometimes the filenames of an attachment contain invalid chars making very dificult to open a TSaveDialog (you have noted this ?), now SakEmail deletes the invalid chars.- Applied a patch from Matjaz Bravc, that resolve the problem of localized dates, letting you choose (in design time) if you want localized dates (NOT recommended) or standards dates (english) via the LocalizedDates boolean property in the TSakSMTP comp. Thanks also to Serge Dosyukov for sending me a fix.- Also I applied another patch of Gregor Duchalski that cure a bug with PChar when this unit is used under NT. - It seems that some machines need more delay when sendig a msg (see previous posting 19/12/97), thanks to Matjaz Bravc.- I discover a bug in the transparency code, it is fixed now. Did you see the benefits of Open Source Software ? :)26/3/981.6.1- Added a FUNCFileName private variable to manage the complete path of the attached file. I receive problems reports with this, it work now ?.- Reduced the line sleep to 30 (tell me if this value doesn‘t work for you).27/4/981.7.0- Fixed a memory leak, thanks to Don Higgins.- Moved the string esErrorInFormatOfMsg to a property of SakPOP.- Because some people need to use IP addresses instead of Host names, I‘ve added a new property IPAddress to SakPOP and SakSMTP. If both are filled, then the Host name will be used, thanks to Roger F. Reghin for reporting this. The side effect for this is that YOUR app must check if the host is a host name or a IP address, in my app I remove the periods and try to convert the result to a float (long integers don‘t work, but float accept chars ‘e‘) if it doesn‘t work I assume that is a host name (someone has a better and simple idea ?).- Added the property FileStream to the class TAtachedFile and the procedure SaveToStream, this was done by Brian Sheperd- The address separator (in the TO: field) is ‘,‘ and ‘;‘ now (before it was ‘,‘ only).1.7.1- Roger F. Reghin has sended me a pair of nice patches that resolve in a good behavior when the destination address is something like &quot;Roger Reghin&quot; <rreghin@hotmail.com> and some servers says that they couldn‘t relay that mail, etc. Also Roger has made the IPAddress property obsolete (do not use it, use Host instead), SakEmail will resolve the host properly no matter if it is a host name or a IP address. So in the next version I will remove the IPAddress property. Thank you, Roger.1.8.0- Well, it seems that I made a mistake, I investigated the previous behavior and it is a fault of the SMTP (RFC 821), so I fixed it.- The IPAddress property has been removed, use Host. Goeran Strehl (asem) has sended me a patch that fix a memory leak and one problem with the object inspector and the Text property of a SakMsg. Dmitry Bondarenko say that some servers do not send the msg size after the RETR command, so he fix that issuing a LIST n command first (work nicely).- Added the property CC (Carbon Copy) to the SakMsg object.1.8.1- Added the property ReturnPath to the SakMsg comp. Minor changes to the scanning code for the filename of attachments.1.8.2- Fixed a bug with the filename of attachments (thanks to Taufer Pavel Ing.).- Added the function IsIPAddress from hou yg (the actual code don‘t work if the server is 265.net :) Fixed a minor bug with html pages like attachments. Some fucking email server return a bounded message declaring the boundary like ‘boundary = ‘ and not ‘boundary=‘ wich is clear in the RFC, fixed.1.8.3- A obscure bug was found by HuangYeJun from china, in the RetrieveHeaders function if the retrieved text was larger than 1024 bytes and the crlf.crlf fall in the middle of two chunks, the function is blocked. I don‘t use this function, btw.1.8.3.1- Just cleaned up a bit the FindUUAtachs function. Not bug or enhancements release. Serge Wagener put me to work >:|1.8.4- Dmitry Bondarenko (again) has found a bug in wich I do not respect the RFC, wich say that replys from the SMTP server could be multi-line, and the previous version just manage as far as two lines. He also send me a nice patch, so the bug is fixed.- Craig Manley added a ExtraHeaders property, please, use with care, it‘s just not valid to put inside it whatever thing.- The CC header was not being added to the headers that were being sent, so Craig fixed it.- Warning: I‘ve put try/except in the TSakPOP.Connect and TSMTP.Connect function around the line FSocket.Open, so you will need to write something like: myPOP.Connect; if POPError then ... in your code, the old way was: try myPOP.Connect; except ..... end; If you are strongly opossed to this change, drop me a line and tell me why (I‘m in doubts).1.8.5- Greg Nixon added the priority property. The default priority for each msg created will be prNormal, so you don‘t need to change your code any bit.1.8.6- Ulf Sturegren has added D4 compatibility, not many changes to the source (one letter), but he found the error.- Hou yg has sent to me a revisited IsIPAddress function, so I put the newer function in, infortunely my reply to him doesn‘t want to go.1.8.7- Ok, I discovered a weird bug, some old emailers (navigator 2) does not format the message in multipart mode if people send an attach, without writing any text and with no MIME settings. Fixed. This could be serious, I recommend upgrading.1.8.8- A small fix with the CC field. Some stupid mail servers put tabs in some fields (CC:, TO:) when they want to make a new line, the correct is to put at least a space in the beginning of the line, added a little code to &quot;fix&quot; that.1.8.9- Some ‘moderns‘ pop3 servers doesn‘t support the LAST command, so I‘ve added a little code to cope with this and added a boolean property ServerSupportLastCmd. See TSakPOP.Init for more details. Reported by Jan Najvarek.1.9.0- Kaufman Alex has added two properties to the SakMsg object, the ContentType and the Headers property, that should be self explaining (I modified a little the code he sended me, btw).1.9.1- I rewrote and greatly simplified the code that deal with the multiple address in the TO: field and remove some possible bugs in it.1.9.2- Alex discovered and fix a bug when a file attached is not enclosed between quotes, resulting in the filename without the first and last character.1.9.3- Better detection of the boundary in multipart messages. Fixed a bug when the attached file is empty.1.9.4- Chris G黱ther send me *lots* of memory leaks fixes, very good job, Chris. - Some weird PGP messages are now processed well.- Yang Qiandong from china fixed a compiler hint and a warning.- Modified TSakSMTP.FReceiveTextFromSocket as suggested by Greg Nixon.- Dmitry Bondarenko send me a patch that fixes some issues with the LAST command (that some servers don‘t implement) and other patch that fixes a problem when servers add spare words in the tail of the answer.- Some minor changes suggested by Matthew Vincent.- Support for _big_ attachments files (me).- Make the code more modular and simple (still is not very modular).1.10.0- Move some stuff to a sak_util unit.- Support for quoted-printable msgs, thanks to Chris G黱ther.- Fix the BCC field.- New property sakMsg.ContentTransferEncoding.2.0.0- Major reestructure of the files and the source code.- Simplifyied sakPOP3.pas a _lot_- Support encapsulated messages (message/rfc822).- Nested multipart messages are processed fine.- Attachs with quoted-printable are processed fine.- Many bugs fixes.2.0.1- A fiasco, sorry.2.0.2- Fixed a bug in the sak_CleanUpAddress.- Do the rigth job if the ContentType is ‘plain/text‘ and the encoding is base64.- Redone sak_ExtractAddress and sak_ExtractAlias.- New ‘Sender‘ property in SakMsg (normally not used, so do not use it, unless you know what you are doing) ‘Thanks‘ to Alex Kaufman for this.2.0.3- A *severe* bug with multiple addresses was fixed.2.0.4- Fixed bogus Message-number (Message-id is the correct) Thanks to Peter Honan- Added SizeInBytes property to the SakMsg component. (petition of Alex Kaufman)- Fixed a minor bug in TSakPOP.RetrieveHeaders. Fix from Alex.- Added RetrieveMessageOnlyHeaders and - RetrieveAllMessagesOnlyHeaders.2.0.5- Fix when the mail server reply is like <cr><cr><lf> (two cr).- Fix function IsIpAddress.- Both fixes by Alessandro Rossi.2.0.6- Fix a bug in the sak_Base64Decode function when the data to decode is null (I found it in the hard way).- Andy Charalambous make it sure you can send more than one email without disconnecting and connecting again.- And Chris ‘Memory Hunter‘ G黱ther killed some memory leaks (again).2.2.0- the f* sleep line that was bothering us for years is gone, gone, gone. Thanks to Syed Ahmed.- a getUIDL method of SakPOP. Thanks to Alex Kaufman.- a UIDL property on SakMsg. (me)- a SakPOP.GetUIDLsOnRetrieve boolean property (default false) (me)- change some ‘Exception.Create()‘ to ‘raise Exception.Create()‘ Thanks to Anton Saburov.- change SakPOP.Init from function to procedure (me)- new SakPOP.NewMsgsCount property (me)- changed SakPOP.Password to SakPOP.UserPassword (me)- changed SakPOP.ErrorInFormatOfMsg to SakPOP.StrErrorInFormatOfMsg- OnLookup event on SakPOP and SakSMTP. Thanks to Syed Ahmed.- OnConnecting event on SakPOP and SakSMTP (me).- OnReceiveTextFromSocket event on SakPOP and SakSMTP (me). (mostly for debug)- OnSendTextToSocket event on SakPOP and SakSMTP (me). (mostly for debug)- Headers are retrieved without the mail body (ugly bug, fix from Alex Kaufman)2.4.0- I‘ve revamped TSakMsg, many funcionality from SakPOP was moved to SakMsg, where it belongs.- Now SakMsg has a RawMail property wich you may find useful, now you can do: SakMsg1.RawMail.LoadFromFile(‘(uidl).mail‘); SakMsg1.ParseMsg; or SakMsg1.RawMail.LoadFromStream( myStream); SakMsg1.ParseMsg; or SakMsg1.RawMail.SaveToFile( ‘(uidl).mail‘); etc, etc...- Added a property TSakMsg.ClearRawMailAfterParse for memory saving.- the return of the f* sleep line (it causes freezes on winsock 1.1 systems like win95, win98 has winsock 2 so there is no problem if you remove the line)- lost of the DecodeProgess events :( (sorry, I don‘t know how to fit this events on the new SakMsg)2.6.0- the sleep() line is dead, it will never come back. Sending an email is a pleasure now.- SakMsg has a TextEncoding (8Bit, Base64) property, I think this will be useful to people with others charset than iso-8859-1- the base64 routines have been rewritten, they are more OO and faster (they are now in SakMIME.pas).- cosmetic changes all over the place.2.6.1- simplifyed ParseMsg2 a lot, it work better now.- speed up the search for uucoded attachs (the previous search was very dumb)- fixed bug Msg.SizeInBytes always 0- added a couple of Application.ProcessMessages to make the app more responsive.2.6.2- moved some functions from sak_utils to SakMIME.- make const parameters all over the place.- fix the bug that introduces a final crlf in quoted-printable attachs.- fix a division by zero if attached file is 0 bytes long, fixed by Peter Kollanyi.2.6.3- fix a rare bug when the header of a email (more probably a encapsulated one) has first line/s in blank. Easy and innocuous bug.2.6.4- fix the bug that insert the attachs of type text/* on the body of the email.- change the Smtp.SendMessage for Smtp.SendTheMessage to avoid a BCBuilder problem. Both problems reported by Andreas Franzen. SendMessage is still there, but it‘s now deprecated, I will remove it in the future.2.6.5- moved the ParseMsg activation from SakPOP to SakMsg (where it belong), this means that after setting the RawMail property of SakMsg, this does a ParseMsg automatically. before: SakMsg1.RawMail := ... SakMsg1.ParseMsg; now: SakMsg1.RawMail := ... hope I‘m not breaking too much code out there ... :)- some changes in the way attachments are processed (now the html part is separated correctly and images within the html are recognized)- RetrieveMessage() and RetrieveMessageOnlyHeaders() now take an additional parameter, a TSakMsg var, so people can change some parameters before parsing, see the source in SakPOP3.pas (the old way is still supported, but they will be removed in the future)- bug fixes that I do not remember.3.0.0- moved code around.- removed deprecated functions (I told you about this)- new SakAttFile unit.- Base64Encode( AttFile), Base64Decode( AttFile), UUDecode( AttFile) has been moved to the TAtachedFile object, so you can do AttFile.Base64Encode, AttFile.Base64Decode, etc- SakSMTP have lost EncodeStart, EncodeProgess and EncodeEnd events as a consequence of the previous change.- SakPOP.Canceled and SakSMTP.Canceled properties have been made read-only and SakPOP.Cancel and SakSMTP.Cancel procedures (or methods) have been added.- add a SakMsg.FillRawMail method that will fill the RawMail property with a rfc822 message based on the properties of SakMsg.- changed SakSMTP.Quit & SakPOP.Quit to Disconnect- deleted TAttachedFile.FileStream (redundant), use BodyBin- removed the function sak_getTempFileName (as it should no be trusted) use function sak_GetTempPath- the new SakIMAP component !, this make a pleasure to work with incoming emails (as you can have folders, etc). Note: the IMAP component has only been tested with the Uni. of Washington server, but it should work with any *STANDARD COMPLIANT* server. Anyways, the code of this component is very simple, so if you have problems, a look in the source code can enligthen you.3.0.1- fixed a brown paper type of bug.3.0.2- support the case where attachs do not come from files (Lars Karlslund)- minor bugfix in UUDecode function (Lars Karlslund)- if the SakMsg.Username is empty, do a VRFY command at the smtp server to try to get the full user name (sergio)- function TSakIMAP.GetFolderList (Peter Nagel)- function TSakIMAP.GetHierarchyDelim (Peter Nagel)- frustrated intent (ie. commented out) to remove memory leaks in POP, SMTP & IMAP destroy functions (Ronald Moesbergen)3.0.3- actually create (and free) the FolderList in sakIMAP (Neculau Andrei)- try to send the FQDM to the HELO command in SMTP (sergio)- commented out the VRFY command in SakSMTP, and cut the from address in the From field (in SakMsg), so if the username is empty, the SMTP server rewrite the from address in a complete way, with username & full address (sergio)- fix a minor bug in TBase64DecodingStream.Write function (Lars Karlslund)3.4.0- many, many improvements to the IMAP component by Peter Honan (I applied the patch with minor modifications, mainly to respect delphi coding standard, taking out the overloading, the selectFolder function was overcomplicated, etc)- FAQ updated (me)3.4.1- minimize the chance for two temporal messages stored on disk to collide (can be hit in previous versions if you run multiple instances of retrieveMessage at the same time)- FAQ updated.3.4.2- a new sak_CleanUpAddresses() implementation, by Knut Baardsen- better handling for temporal messages, suggested by Andrew- many improvements (including ACL -Access Control List) to the IMAP component by James Chaplin3.4.3- reverted to the old sak_CleanUpAddresses() implementation Knut‘s one is almost rigth, but don‘t let us use addresses without domains- add Headers.Clear before filling headers, by &quot;Antonio Carlos Ribeiro Faria&quot; <consultor@cys.com.br>3.5.0- add TSakMsg.LoadFromTextFile from Oak Chantosa- big jumbo mambo patch from James Chaplin first patch: 1) Operation timeout - OperationTimeout timeout for non-responding receive operations. 2) Forced abend - ForceAbend method that will disconnect and reset state. 3) Optional folder lists - AvFolderList and AvSUBFolderList provide alternatives to FolderList and SUBFolderList that ensure the lists do not contain inacessible folders ( flagged by the server ). 4) Folder name fix - Provided a function to &quot;fix&quot; folder names before submission. Currently it fixes names containing spaces. second patch: 1) Capability - Ask for server capabilities/extensions. 2) Noop - Basic noop command - updates message counts as well - preferred alternative to status. 3) Status - Explicit status command - generally useful for status of a non-selected mailbox. 4) Fetch - Retrieve message data. 5) FetchBody - Retrieve the body of the message. 6) ExamineFolder - A read-only select command. 7) CloseSelectedFolder - Close the currently selected folder. 8) Idle - RFC2177 extension - not implemented on very many servers. 9) Search - Search based on RFC2066 criteria. 10) UIDSearch - Search based on RFC2066 criteria - results are in UID form. 11) UIDStoreFlags - Store message flags based on UID. 12) UIDFetch - Fetch message data by UID. 13) UIDCopyMessageToFolder - Copy a message by UID. 14) Authenticate - Basic framework. Only plain authentication extension implemented. 15) CloseOnError - A new property that allows the user to turn off the default behaviour of disconnecting from the server when an IMAP error is received 16) Namespace - RFC2342 Namespace query command. 17) ListFullHierarchy - Property which allows a switch between &quot;*&quot; ( default ) or &quot;%&quot; as the wilcard for default folder/list methods. 18) List - Explicit list command in case it is needed. third patch: 1) fix problem with imapd 2001a, reported by Holger Mauermann. 2) remove all warnings.3.5.1- revert change to the base64 encoding routine.3.5.2- changes from James Chaplin: 1) TSakIMAP will now properly process non-numeric UIDs for messages ( there was a sak_StrWord2Int transform being used before - which always produced a 0 value for non-numeric UIDs ). 2) TSakIMAP.RetrieveMessageExt ( private method ) was modified to provide a retrieval by either MsgID or UID. 3) TSakIMAP.RetrieveMessageByUID was modified to use the slightly more efficient TSakIMAP.RetrieveMessageExt(UID) method specified in 2) above. I also made an update to the SakMIME.pas unit. The changes that were implemented are: 1) sak_Base64Encode - a basic Base64 encoder. String input and string output with the option for CRLF splitting. 2) sak_Base64Decode - a basic Base64 decoder. String input and string output with a control for CRLF interpretation. 3) sak_Base64Verify - a very basic Base64 string verifier.3.5.3- robustify and code cleanups by Paul Vernon.3.5.4- access violation fix by Paul Vernon.3.5.5- go back to good old trusty 3.5.23.5.6- this time, all the cleanup & fixes from Paul Vernon seems to work well.3.6.0- Paul Vernon latest minor fixes- added basic SMTP authentication, by Delfi and Antonio Carlos Ribeiro Faria3.6.1- fix a mayor bug when sending to many addresses (by sergio)3.7.0- add full support for html mails, by Paul Vernon. (The TAttachedFile now has an extra boolean property called embedded. This property lets you use the syntax <img src=DownloadFiles2&quot;CID@myimg.gif&quot;> in your HTML mails)- fix a weird typo for BCC fields- add Content-ID, by alejandro Castro- fix &quot;_&quot; characters in subject, regression fix.- cleanups all around, by Paul Vernon.- SMTP example updated to cope with html emails.**warning** from this version, the html part of mails will not be stored as attachments by default, if you want this behavior, you just do something like: aSakMsg := TSakMsg.Create( self); aSakMsg.HTMLAsAttachment := true; ...3.7.1- fix TSakMsg.PopulateList (Jalin)3.7.2 (codenamed &quot;melissa&quot;)- fixed a bug when the Populatelist procedure got re-written in sakMsg. It wasn‘t populating the SendTo field if there was only one e-mail address... (Paul Vernon)3.7.3 - Congratulations to Sergio on the addition to his family. This release was made by Paul Vernon who has temporarily taken over the release functions for the SakMail components whilst Sergio spends time AFK!- The 3.7.2 bug fix added blank entries to the address lists. The PopulateList procedure has been re-written again to hopefully cope with any type of e-mail address formatting.- The SMTP example noted in 3.7.0 actually shipped with this release!3.7.4- Bugfix for detecting UUEncoded mails correctly. Previous versions processed MIME mails with the value ‘begin xyz‘ if it appeared at the beginning of a line as a UUEncoded mail when they should not have.- POP and SMTP connect procedures are now functions. Existing code is unaffected. However, you can now use the following code if (sakPOP.Connect) then begin end;- POP gracefully quits if it receives an error now by calling Disconnect correctly.3.7.5- Further code to improve identification of UUEncoded mails. Essentially looking for the end as well as the beginning to ensure that it is correct.- Code optimisation of certain UUEncoded mail id functions.- Fix to ensure that the body of a mail that is UUEncoded is not lost.- MIME-Version string introduced into TsakMsg component to help with UUEncoded mail identification.- SizeInBytes property altered to read private variable using a function. If the private variable is 0, the function reads the length of the FRawMail.Text property.- Fix to make sure that the filename is not overwritten by a blank value when parsing mail-headers.3.7.6- Fixed list index out of bounds error.- Added POP3 RSET call TSakPOP.Reset.3.7.7- Altered SizeInBytes and Octets values to return server-side size when d/l headers only and use actual size once the entire message is downloaded.- Fixed a bug in GetBasicHeaders where To and CC fields could be mishandled if the mail headers were formed in a particular way.4.0.0 beta- All methods are now wrapped in classes. sak_util is now included for backwards compatibility only.- Several changes to make sakMail thread safe including the introduction of Mutexes which are cross process safe. Critical sections were an option however, although mutexes are a little slower, they are much more effective when you aren‘t sure how the code is going to be deployed...- Made several changes to the way connections are tracked, now making better use of the underlying Delphi components own properties and functions.- Several bug fixes included from solutions posted on mailing lists. Including change to datetime function to respect local time separator. There are more including one that Adem re-raised.- Removed almost all pointers as per Adems suggestion. Makes for neater code.- Hopefully backwards compatibility is kept. This is one of the objectives of the excersice although, internally, the components no longer use any of the non-object based methods. Also some of the non-object based methods actually have been re-written to create an object use the instance of the original method and then destroy the object again. This introduces a minor overhead however, because the objects are discreet, the trade is for much better memory usage and greater thread safety.- Introduced an include file to define compiler directives. Currently there are two directives. One defines whether to use the VCL or not, the other defines whether or not to use the FastStrings components. - With the intoduction of the Include file, this allows the development of code that is optional for users. One of these such changed is the use of the FastStrings base64 decoder. If you install the FastStrings components and turn on the compiler directive, you should have no functional changes however, the base64 decoder routines should have a much higher performance rating. Tests clock in at over 2000% faster attachment decoding on a P4 1.8GHz machine. (1.2Mb file 1686mS native sak Base64 Decoder, 79mS using FastStrings!)- This version is being released as a beta as the changes are pretty drastic. If the code is deemed to be stable and backwards compatible then it will be re-released as v4.0.1 with no changes.4.0.1 beta- Fixed an issue where Range Checking highlighted that the Attachment b64 decode routine raise a Range Error if the line that was to be decoded was empty. i.e. ‘‘.- Introduced a compiler directive to turn off range checking in the sakMIME procedure TBase64DecodingStream.Write to make sure that it runs correctly as Range Checking causes issues in this function.4.0.2 beta- Changed MailDateToDateTime function to the one provided by DengZhaoHui with a few modifications as even though it has better date processing than the original it caused EConvertErrors with some non-rfc dates.- Added the compiler directive to allow the inclusion of MD5 components from the DCPCrypt suite of encryption components. This allows the components to do APOP and SMTP AUTH functions as specified in RFCs 2095, 2104, 2449 and 2554. {UseDCP} ***** NOTE: These functions are experimental as although they are RFC compliant, they have not been tested against a secure mail server yet... *****- Using EurekaLog during load testing of the POP mail component, found and fixed several AV‘s in sakMSG, sakMIME and sakPOP. Mainly simple mistakes that required re-ordering of code or more checks before trying to manipulate data.- Altered the sockets code to be more stable with some servers. The previous implementation was totally incompatible with SendMail NT v3.0.2.- Fix added to compensate for incorrect operation of Connected property in some versions of Delphi.- Altered GetMultiLineFieldBody as per Adems suggestion. Also took some of Adems code and added it to GetFieldValueFromLine as the escape characters can appear in single line headers as well as multi-line ones.- TClientSocket is deprecated in Delphi 7. This may be the next large change in the sakEmail components. - Updated distribution to include more RFC‘s regarding the message format, POP and IMAP and hashing functions for CRAM mechanisms.- Fixed the handling of redirected mails as created by Eudora.- Force PopulateList to clear the list before populating it again.- Created a Delphi 6 package file.4.0.3 - Fixed AUTHSMTP buffer initialisation error. (Dmitry G. Kozhinov and Gabi Slonto)- Improved identification of servers that do not support the UIDL command. A small overhead is intorduced on servers that do support the command and have several mails to download but the feature allows better interaction with those servers that do not support UIDL.- Priority is now reported correctly when an e-mail is being decoded rather than only being used when sending an e-mail.4.0.4- Fixed an issue with a malformed header in a mail sent from MS Word through an Exchange server- Added a couple of try...finally blocks to the sakIMAP component.- Altered the sakIMAP components connected function to mirror the more accurate sakPOP method.- Consolidated all compiler directives into sakDef.inc- Added versioning compiler directives to allow the compilation of sakemail under Delphi 4.- General tidying of code. 4.0.5- Created a Delphi 7 package- Added properties to the IMAP component to allow read access to the LocalAddr and LocalHost socket properties.- Bugfix to sakMsg PopulateList function where a comma separated list did not contain any spaces- Access violation in sakPOP component due to incorrect use of free,freeandnil and compiler directives4.0.6- Added several features to the IMAP components.- Tidied up SMTP authentication routines (Improved use of MD5 for authentication using DCP components)- Included capability to send messages without an SMTP server (using Indy DNS components for MX lookups)- Bugfix in message parsing to stop a recursion loop due to a malformed mail.4.0.7- Memory leaks found by Amos and Paul regarding the sakMsg and sakPOP units respectively.- Bug fixes to attachment save code including stripping out invalid .. sequences from filenames- Improved the GetConnectedState method to check against the RemoteHost value on the Socket.- Updated POP example to be more responsive when downloading mail. Fixed a memory leak.Don‘t forget to subscribe to the mailing list (see the web pages at http://groups.yahoo.com/group/sakemail/)

政府科技管理者在推动科技成果转化过程中,如何高效识别和配置高价值技术成果?.docx

政府科技管理者在推动科技成果转化过程中,如何高效识别和配置高价值技术成果?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

谷歌应用商店9659款应用清洗分析数据集GooglePlay

谷歌应用商店9659款应用清洗分析数据集GooglePlay

Google Play商店公开应用数据的清洗分析版,最终包含9659款唯一应用与15个强类型字段。清洗工作:移除1条畸形记录与1181条重复应用(重复时保留评论数最多的记录);将安装量、评论数、价格、应用大小转换为可用数值字段;大小统一为Size_MB;最近更新字段转为日期;类别标签标准化;新增Primary_Genre与Min_Android便于分析;缺失值保留null不做插补。字段覆盖应用名称、类别、评分、评论数、安装量、价格、内容分级、题材、更新日期、应用版本、大小与安卓版本要求。数据为2018年快照,安装量为区间下限而非精确值。适用于Python、SQL、机器学习入门项目的即用型分析数据。

完美复现基于自适应虚拟谐波阬的光储VSG并网电流谐波抑制模型(Simulink仿真实现)

完美复现基于自适应虚拟谐波阬的光储VSG并网电流谐波抑制模型(Simulink仿真实现)

【完美复现】基于自适应虚拟谐波阬的光储VSG并网电流谐波抑制模型(Simulink仿真实现)内容概要:本文介绍了基于自适应虚拟谐波阬的光储VSG(虚拟同步发电机)并网电流谐波抑制模型的Simulink仿真实现方法。该模型旨在解决光伏发电与储能系统在并入电网过程中产生的电流谐波问题,通过引入自适应虚拟谐波阬技术,动态调节VSG控制参数,有效抑制特定次谐波,提升电能质量与系统稳定性。文中详细阐述了控制策略的设计原理、关键模块的构建方式以及仿真模型的实现过程,并通过仿真结果验证了所提方法在不同工况下的有效性与鲁棒性。; 适合人群:具备电力电子、新能源发电或电力系统自动化等相关背景,熟悉Simulink仿真工具,从事科研或工程应用的研发人员及高年级研究生。; 使用场景及目标:①研究光储系统并网电能质量问题及谐波抑制技术;②掌握VSG控制策略与自适应控制算法在新能源并网中的应用;③构建并调试复杂电力系统Simulink仿真模型,用于学术研究或工程项目验证。; 阅读建议:学习者应结合提供的仿真模型与说明文档,深入理解控制逻辑与参数设计原理,动手复现仿真结果,并尝试改变工况与参数以探究系统动态特性,从而全面掌握该谐波抑制技术的实现方法与应用要点。

考虑绿证交易以及碳排放交易市场的风光火储调度结合柔性负荷!包含碳流追踪、碳足迹分析(Matlab代码实现)

考虑绿证交易以及碳排放交易市场的风光火储调度结合柔性负荷!包含碳流追踪、碳足迹分析(Matlab代码实现)

内容概要:本文档聚焦于“考虑绿证交易及碳排放交易市场的风光火储多源协同调度结合柔性负荷”这一前沿课题,提供了一套完整的Matlab代码实现方案,系统构建了包含风能、光伏、火电、储能与柔性负荷的综合能源系统优化调度模型。通过引入绿色证书交易机制与碳排放权交易市场,全面评估其对系统运行经济性与低碳化水平的耦合影响,实现了经济成本与碳排放目标的多维度协同优化。方案集成了碳流追踪与碳足迹分析功能,能够精确量化不同电源及负荷环节的碳排放贡献,增强了调度决策的透明性与科学性。配套资源包括详细的说明文档、参考文献与仿真案例,有助于深入理解模型架构、约束条件与求解流程。; 适合人群:适用于从事电力系统优化调度、综合能源系统规划、低碳电力技术、碳市场机制研究等方向的科研人员,以及具备一定Matlab编程能力和电力系统基础知识的硕士、博士研究生与高年级本科生。; 使用场景及目标:①开展高比例可再生能源接入下的电力系统低碳经济调度研究;②实现电力系统碳流分布与全生命周期碳足迹的精细化分析;③探究绿证与碳交易政策对电源出力、储能运行及负荷响应的引导作用;④支撑相关学术论文的模型复现、算法验证与仿真分析工作。; 阅读建议:建议读者按照提供的目录结构循序渐进地学习,重点研读模型的数学建模过程与Matlab代码实现逻辑,结合参考文献深化对碳交易机制与优化理论的理解。推荐在Matlab环境中实际运行并调试代码,通过调整参数观察系统响应,进而掌握模型的核心机制,并可根据具体研究需求进行功能拓展与算法改进。

产业园区如何高效挖掘企业技术需求并精准匹配科技成果?.docx

产业园区如何高效挖掘企业技术需求并精准匹配科技成果?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

三相四桥臂电压不对称跌落补偿动态电压恢复器DVR(Simulink仿真实现)

三相四桥臂电压不对称跌落补偿动态电压恢复器DVR(Simulink仿真实现)

内容概要:本文详细介绍了基于三相四桥臂逆变器的动态电压恢复器(DVR)在电压不对称跌落情况下的补偿策略,重点研究了不平衡负载条件下多准PR并联控制器的设计与仿真验证。通过Simulink搭建系统模型,实现了对电网电压跌落的快速检测与补偿,有效提升了电能质量与供电可靠性。文中涵盖了控制算法设计、系统建模、仿真分析及参数整定等关键技术环节,并提供了完整的参考文献与说明文档支持。; 适合人群:具备电力电子、自动控制或电气工程相关背景,从事电能质量治理、DVR系统开发或微电网研究的科研人员及工程技术人员,尤其适合研究生及以上层次的研究者。; 使用场景及目标:①用于解决电网电压不对称跌落引起的敏感负荷供电中断问题;②为不平衡负载条件下的DVR控制策略设计提供仿真验证平台;③支持多准PR控制器在四桥臂逆变器中的应用研究与教学实践。; 阅读建议:建议读者结合提供的Simulink模型与代码资源,按照文档目录顺序逐步学习,重点关注控制策略的实现细节与仿真结果分析,同时参考相关文献深化对DVR工作原理的理解。

Delphi 13.2控件之DynamicSkinForm VCL v12.96 Full Source (01.10.2013).zip

Delphi 13.2控件之DynamicSkinForm VCL v12.96 Full Source (01.10.2013).zip

Delphi 13.2控件之DynamicSkinForm VCL v12.96 Full Source (01.10.2013).zip

CentOS 安装 Docker 完整教程:镜像加速配置、常见坑与常用命令大全

CentOS 安装 Docker 完整教程:镜像加速配置、常见坑与常用命令大全

面向 CentOS/RHEL 的 Docker 安装完整教程,包含镜像加速配置、daemon.json 避坑、启动失败排查,以及容器、镜像、Compose V2、磁盘清理等常用命令速查。

产业园区运营负责人如何通过平台实现企业服务能力精准匹配?.docx

产业园区运营负责人如何通过平台实现企业服务能力精准匹配?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

RBF模糊神经网络PID、传统PID控制自适应对比仿真(Simulink函数实现)【参考文献+说明文档+仿真】

RBF模糊神经网络PID、传统PID控制自适应对比仿真(Simulink函数实现)【参考文献+说明文档+仿真】

内容概要:本文档系统性地提供了RBF模糊神经网络PID与传统PID控制在自适应性能方面的对比仿真资源,涵盖Simulink与m函数两种实现方式,并配套完整的参考文献、说明文档及可运行仿真模型。核心内容聚焦于通过仿真实验对比RBF模糊神经网络自适应PID控制与传统PID控制在动态响应速度、稳态精度、抗干扰能力及自适应调节等方面的性能差异,突出前者的智能化优势。此外,资源还扩展包含多种优化算法(如PSO、SSA、RIME)与神经网络结合的PID控制策略,形成多算法性能对比体系,适用于非线性、时变复杂系统的控制研究与优化设计。; 适合人群:具备自动控制原理基础和MATLAB/Simulink仿真能力的科研人员、研究生及自动化、电气工程等领域的工程技术人员,尤其适合从事智能控制算法开发、先进PID控制器设计及相关课题研究的专业人士。; 使用场景及目标:①开展智能PID控制算法的科研与教学实践;②完成控制系统性能优化与仿真验证任务;③支撑毕业论文、科研项目中的控制策略设计与对比分析;④深入掌握RBF神经网络、模糊逻辑与传统PID控制的融合机制与工程实现方法; 阅读建议:建议结合所提供的参考文献与说明文档,逐步运行并调试各类仿真模型,重点关注不同控制算法在典型工况与扰动条件下的输出响应曲线,深入理解其参数整定逻辑与结构设计原理,从而全面提升对先进自适应控制策略的分析与创新能力。

于加速热流体拓扑优化与自适应网格加密的降空间相似性降阶初始化模型(RS-ROIM)Matlab代码.rar

于加速热流体拓扑优化与自适应网格加密的降空间相似性降阶初始化模型(RS-ROIM)Matlab代码.rar

于加速热流体拓扑优化与自适应网格加密的降空间相似性降阶初始化模型(RS-ROIM)Matlab代码.rar

国央企创新负责人如何借助平台实现创新资源高效流转?.docx

国央企创新负责人如何借助平台实现创新资源高效流转?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

【计算机图形学】基于Three.js与Shader的太极全息场动态渲染:GPU加速极坐标分形动画实现方案

【计算机图形学】基于Three.js与Shader的太极全息场动态渲染:GPU加速极坐标分形动画实现方案

内容概要:本文介绍了实现“动态旋转的太极全息场”的图形渲染优化技术,提出将全息场作为纹理(texture)一次性上传至GPU,利用Three.js结合自定义GLSL着色器在GPU端完成旋转与分形变形,避免CPU每帧计算64个控制点带来的主线程压力。核心技术包括:将笛卡尔坐标转换为极坐标,使用正弦函数生成脉冲同心圆,叠加多层噪声形成分形细节,并通过余弦函数组合构建动态调色板实现色彩变化。着色器代码示例展示了基于极坐标和时间变量的S曲线调制方法,实现太极图案的动态旋转与视觉层次增强。; 适合人群:具备WebGL、Three.js和GLSL基础,熟悉图形编程的前端或可视化开发人员,尤其是有一定Shader编写经验的中高级开发者。; 使用场景及目标:①优化高频更新图形效果的性能,减少CPU-GPU数据传输开销;②实现复杂的动态全息视觉效果,如太极图案的流畅旋转与分形细节渲染;③学习极坐标变换、噪声叠加、动态调色板等Shader视觉技巧的实际应用。; 阅读建议:此资源侧重于GPU端视觉效果的高性能实现,建议读者结合Three.js环境动手实践着色器代码,深入理解坐标变换、纹理采样与时间驱动动画的整合方式,重点关注性能优化逻辑与视觉效果的平衡设计。

T型三电平SVPWM并网逆变器simulink仿真

T型三电平SVPWM并网逆变器simulink仿真

内容概要:本文档系统性地介绍了T型三电平SVPWM并网逆变器的Simulink仿真技术,涵盖中点电位平衡、低电压穿越(LVRT)、正负序分离、电网前馈控制等关键控制策略,并融合虚拟同步发电机(VSG)、模型预测控制(MPC)、双闭环控制等先进方法以提升并网性能。文档还涉及DVR动态电压恢复器、Z源逆变器、LCL滤波器、孤岛检测等多种典型电力电子拓扑与控制算法的建模与仿真,部分案例结合智能优化算法(如RIME、SSA、PSO)对PID控制器参数进行优化,显著改善系统动态响应与稳定性。此外,包含风电、光伏、储能协调调度及碳流追踪、碳足迹分析等综合能源系统研究内容,配套详实的参考文献、说明文档与仿真模型,具有较高的科研与工程应用价值。; 适合人群:电气工程、自动化、新能源等相关领域的研究生、科研人员及从事电力电子与并网控制的技术工程师,需具备Matlab/Simulink操作能力和电力系统基础知识; 使用场景及目标:①开展三电平逆变器及其控制策略的科研仿真与论文复现;②设计高性能并网控制系统,深入研究中点电位平衡、低电压穿越、谐波抑制等核心技术;③结合智能优化算法优化控制器参数,提升系统鲁棒性与动态性能; 阅读建议:建议结合提供的参考文献与仿真模型循序渐进地实践,重点关注控制策略的实现逻辑、参数整定过程及仿真结果对比分析,充分利用配套资源进行验证与拓展研究。

香橙派5-uefi-edk2-spi-flash镜像

香橙派5-uefi-edk2-spi-flash镜像

香橙派5-uefi-edk2-spi-flash镜像

电力系统风储联合一次调频仿真模型(Simulink仿真实现)

电力系统风储联合一次调频仿真模型(Simulink仿真实现)

内容概要:本文详细介绍了一套基于Simulink的电力系统风储联合一次调频仿真模型,涵盖三电平ANPC并网逆变器、DPWM调制控制、正负序分离、电网前馈控制、虚拟同步发电机(VSG)控制、双闭环与中点电位平衡控制等核心技术,并实现了SVPWM/SPWM调制、无功功率扰动、孤岛检测、不平衡电网下的延时相消法、模型预测控制(MPC)、动态电压恢复器(DVR)及多准PR控制等多种先进电力电子与控制策略的仿真实现。文档还系统梳理了智能优化算法、机器学习、图像处理、路径规划、通信与信号处理、电力系统管理等多个科研方向的技术应用与支持资源,为科研工作者提供全面的技术参考与仿真案例支撑。; 适合人群:电力系统、电气工程、自动化及相关专业的科研人员与研究生,具备一定MATLAB/Simulink仿真基础的研究者。; 使用场景及目标:①开展风电与储能参与电网一次调频的建模仿真研究;②深入掌握三电平逆变器及其多种先进控制策略的设计与实现方法;③支撑高水平学术论文撰写与科研项目开发,提升技术创新与工程实践能力。; 阅读建议:建议结合提供的网盘资源与公众号资料系统学习,按照目录顺序逐步深入,注重理论分析与仿真实践相结合,充分利用参考文献、配套文档与示例模型,全面提升科研效率与技术理解深度。

最新推荐最新推荐

recommend-type

RBF模糊神经网络自适应PID控制、传统PID控制对比仿真(m函数实现)

内容概要:本文档聚焦于RBF模糊神经网络自适应PID控制与传统PID控制的对比仿真研究,采用MATLAB m函数实现两种控制算法的编程与性能对比,重点展现RBF神经网络在动态调整PID参数方面的自适应能力与智能化优势。通过系统仿真实验,全面评估了两种控制策略在响应速度、稳态精度、超调量及抗干扰能力等方面的差异,验证了RBF模糊神经网络自适应PID控制在复杂非线性系统中 superior 的控制性能。文档同时列举了多种延伸案例,如PSO优化RBF、BP-PID、模糊PID等先进控制算法的对比分析,并配套提供了完整的仿真程序、说明文档及参考文献,便于读者复现与拓展研究。; 适合人群:具备自动控制原理基础知识和MATLAB/Simulink仿真能力的高校研究生、科研人员以及从事控制工程、电气自动化等相关领域的技术人员。; 使用场景及目标:①深入理解智能控制算法(如RBF神经网络、模糊控制)与经典PID控制在结构与性能上的本质区别;②为高精度、强鲁棒性控制系统的设计提供算法选型依据和技术验证手段;③支撑科研论文撰写、课程项目开发或实际工程中控制策略的仿真验证与优化分析; 阅读建议:建议结合m函数代码与可能的Simulink模型对照学习,重点关注RBF网络的结构设计、参数自适应律的实现机制以及不同工况下的性能指标对比曲线,同时可参考文档中列出的其他优化算法案例进行横向比较与深入探究。
recommend-type

产业园区运营负责人如何实现创新资源的精准匹配与高效对接?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。
recommend-type

含中间直流的三相电力电子变压器PET仿真模型(Simulink仿真实现)

内容概要:本文详细介绍了一种含中间直流环节的三相电力电子变压器(PET)的Simulink仿真模型,基于MATLAB/Simulink平台构建,完整呈现PET系统的拓扑结构与工作原理。该模型涵盖前级三相整流、中间直流电压环节及后级逆变三大核心部分,实现了电能的高效变换、电气隔离与电压等级灵活调节。系统支持对功率双向流动、电压稳定控制、谐波抑制及动态响应特性的仿真分析,具备良好的模块化设计与可扩展性,便于集成先进控制策略如PI控制、前馈补偿、SVPWM调制等,适用于新型电力电子系统的研究与验证。; 适合人群:电气工程、自动化、电力电子与新能源系统等相关专业的高校研究生与本科生,以及从事智能电网、电力变换技术、微电网控制等领域研究的科研人员和工程技术人员。; 使用场景及目标:①用于电力电子变压器教学课程中的原理讲解与实验仿真;②支撑科研项目中对PET拓扑结构、控制算法(如电压外环电流内环双闭环控制)的设计与验证;③为新能源并网、直流配电、电能质量治理等实际工程应用提供仿真平台与技术参考; 阅读建议:建议结合电力电子技术、现代控制理论与电力系统分析等基础知识进行学习,重点关注系统各模块间的能量交互机制与控制逻辑实现,建议动手调整仿真参数并观察动态响应,以深化对PET运行特性的理解。
recommend-type

政府科技管理者在推动科技成果转化时,如何确保政策落实与资源精准匹配?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。
recommend-type

科技中介服务机构如何通过平台提升服务的专业性与便捷性?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。
recommend-type

Go语言高并发云原生数据库实战:覆盖时序、图、文档、关系型及区块链数据库

数据库系列课程中“Go语言高并发与云原生项目实战资源”这一标题,实质上指向当前企业级数据基础设施演进的核心交汇点:以Go语言为开发底座,深度融合高并发处理能力、云原生架构范式与多模态数据库技术体系的工程化实践路径。其描述中“New SQL OLAP”并非泛指传统OLAP(联机分析处理)系统,而是特指新一代基于SQL接口、面向实时/近实时分析场景、具备弹性伸缩、存算分离、多租户隔离、流批一体能力的现代化分析型数据库范式——它既继承了SQL易用性、标准兼容性与成熟生态优势,又突破了传统MPP架构在动态扩缩容、混合负载支持、低延迟响应(亚秒级)、高吞吐写入(百万TPS级)及云环境适配性等方面的固有瓶颈。该范式典型代表包括ClickHouse(列式存储+向量化执行+异步复制)、Doris(MySQL协议兼容+物化视图+Rollup预聚合)、StarRocks(全新C++内核+智能物化视图+统一实时分析)、Trino(联邦查询引擎+插件化连接器+无状态协调节点)以及由Go语言主导构建的新兴系统如QuestDB(专为时序优化的SQL OLAP,支持毫秒级时间分区、内存映射IO、SIMD加速)、Materialize(基于Timely Dataflow实现的增量物化视图引擎,支持SQL流式持续查询)等。 从压缩包内子文件名列表可深度解构其知识体系全景:首先,“时序数据库”模块聚焦IoT、监控、金融行情等高频写入、按时间窗口聚合、降采样、异常检测等典型场景,涵盖InfluxDB(TSM引擎+Flux查询语言)、Prometheus(本地TSDB+Pull模型+Recording Rules)、TDengine(单机亿级写入+超级表建模+内置计算函数)及QuestDB(Go+Rust混合编写,支持SQL JOIN时序对齐、LIVE QUERY实时订阅)等,强调时间戳主键设计、倒排索引优化、无锁写入队列、LSM-Tree与Delta Encoding压缩策略;“关系型数据库”部分不仅覆盖MySQL(InnoDB事务隔离级别实现、Buffer Pool管理、Redo/Undo日志机制、主从GTID复制)、PostgreSQL(MVCC快照原理、WAL日志归档、逻辑复制、扩展PL/pgSQL与FDW外部数据包装器),更深入探讨其在云原生下的演进形态——如Citus(PG分布式扩展)、CockroachDB(Spanner-inspired强一致分布式SQL,Raft共识+Multi-Raft Group分片)、YugabyteDB(DocDB存储层+YSQL兼容层,支持自动分片与跨区域复制);“文档型数据库”解析MongoDB(WiredTiger引擎的LSM+Copy-on-Write、Change Streams实时监听、Aggregation Pipeline阶段优化)、Elasticsearch(倒排索引+Doc Values列存+Query DSL语法树编译、Hot-Warm-Cold冷热分层架构)及其与Go生态集成(mongo-go-driver异步操作、elastic/v7客户端批量写入优化);“图数据库”涵盖Neo4j(Cypher查询语言+原生存储+图算法库)、Nebula Graph(Shared-Nothing架构+Storage-Compute分离+gQL查询语言)、Dgraph(Raft分片+GraphQL+-like查询+增量同步),重点剖析属性图模型、Gremlin/Cypher图遍历算法复杂度、索引组织(如Label Index、Property Index、Composite Index)及Go客户端驱动的连接池管理与事务控制;“数据仓库与大数据”模块横跨Lambda/Kappa架构对比、Iceberg/Hudi/Delta Lake三大开源表格式(ACID事务保证、Schema演化、Time Travel、隐藏分区、Z-Order聚类)、Flink SQL实时ETL、Spark SQL离线数仓构建,并强调Go语言在数据管道编排(如通过Airflow Go SDK或自研轻量调度器)、元数据服务(Atlas Go Client)、数据质量校验(custom Go validator集成Great Expectations)中的独特价值;“区块链”子项并非孤立技术,而是作为可信数据源接入层,解析Hyperledger Fabric(Channel隔离+Chaincode链码+Private Data Collection)、Ethereum(Solidity合约+Web3.go SDK交互+事件日志解析)如何与OLAP系统联动,实现链上数据可信导入、溯源分析与合规审计;“图数据库”与“区块链”的并列暗示了知识图谱与链上地址关系挖掘、反洗钱图谱构建等交叉应用场景。 整个课程体系以Go语言为贯穿主线:利用其goroutine轻量级协程与channel通信机制实现高并发数据采集Agent(如Kafka Consumer Group自动再平衡、Prometheus Exporter指标暴露);借助net/http与fasthttp构建低延迟API网关,对接多数据库后端并实现熔断限流(go-zero微服务框架集成Sentinel);运用Go Module依赖管理与CGO调用C/C++高性能库(如ClickHouse C++ client、OpenSSL加密);结合Docker+Kubernetes Operator模式封装数据库StatefulSet部署(如etcd-operator、postgres-operator),实现自动化备份恢复(Velero+Restic)、配置热更新(Consul KV+watch)、健康探针定制(livenessProbe执行SQL心跳检测)。尤为关键的是,课程将“云原生”具象为可观测性(OpenTelemetry Go SDK埋点+Jaeger链路追踪+Prometheus指标采集)、声明式API(CRD定义数据库实例规格)、服务网格集成(Istio mTLS加密数据库连接)、GitOps交付(Argo CD同步Helm Chart部署Doris集群)等可落地实践。最终,所有技术模块均服务于构建一个具备毫秒级实时分析、PB级数据规模、跨地域高可用、多源异构数据联邦、安全合规审计能力的新一代SQL OLAP平台——这不仅是技术选型的集合,更是面向未来十年数据密集型应用的系统性工程方法论。
recommend-type

OpenStock:中小企业可用的开源库存管理系统

## 1. OpenStock 是什么:一个面向中小企业的开源库存管理系统,不是玩具项目 OpenStock 这个名字乍一听像某个云服务的子产品,但实际它是一个完全面向真实业务场景打磨出来的开源库存管理平台。我第一次在 GitHub 上看到它时,第一反应是“又一个 React + MongoDB 的练手项目”,点开 README 后才意识到——这东西真能用,而且已经在三家本地五金店、两家烘焙工坊和一家小型医疗器械经销商那里跑了一年多。它不追求炫酷的 3D 仓库可视化,也不堆砌微服务架构,核心就干一件事:让老板、仓管员、采购员三类角色,在同一套数据底座上,用最顺手的方式完成“入库→上架→出库→
recommend-type

深度学习里常听说的‘内积层’到底指什么?它和全连接层是什么关系?

### 关于内积层的理解 在深度学习领域,并不存在名为“内积层”的标准术语。然而,在某些情况下,“内积”这一概念可能被提及来描述特定类型的运算或者变换过程。 #### 内积的概念解释 内积是指两个相同维度向量之间的乘积累加操作,即对应位置元素相乘后再求和的结果。这种计算方式广泛应用于各种机器学习算法之中[^1]。当提到“内积层”,可能是指涉及此类运算的一个抽象层次或者是对某一具体实现方法的形象称呼。 #### 类似功能的层——全连接层 实际上,在卷积神经网络架构里承担类似角色的是全连接层(Fully Connected Layer),该层负责接收来自前面各层提取到的空间局部特征并将其
recommend-type

MATLAB 2019实现多波形同坐标绘图及示波器数据导出至Excel和Origin

在MATLAB中实现“多波形同坐标”绘制,是信号处理、控制系统仿真、通信系统建模、电力电子分析以及各类工程科研实验数据可视化中的核心技能之一。该技术的本质在于:将多个具有相同横轴物理意义(如时间、频率、采样点索引等)但不同纵轴响应特征(如电压、电流、相位、幅值、误差、状态变量等)的波形信号,在同一组坐标系(即同一个axes对象)中叠加显示,从而实现直观对比、趋势分析、时序对齐、误差评估与动态演化观察等关键科学目的。其重要性远超简单的绘图操作,而是一种融合了数据采集逻辑、内存管理策略、图形句柄控制、色彩语义设计、图例标注规范及跨平台数据互通能力的系统性工程实践。 首先,从数据来源维度看,“多波形”的生成途径高度多样化:既可来自Simulink模型中多个Scope模块的实时仿真输出,也可源于MATLAB脚本中通过算法生成的多组理论波形(如正弦+方波+锯齿波混合信号),还可导入外部测量设备(如示波器、DAQ卡、网络分析仪)采集的实测数据(.csv/.mat/.tdms格式)。尤其在Simulink环境中,新版MATLAB(R2019a及以后)对Scope模块进行了深度重构——引入了“Logging to Workspace”机制,取代了旧版中依赖To Workspace模块或手动右键导出的低效方式。用户只需在Scope界面点击齿轮图标→进入Configuration Properties→勾选“Log data to workspace”,并指定变量名(如waveData)、保存格式(推荐Array或Timeseries)及采样率/缓冲区大小,即可在仿真结束后自动将全部通道数据以结构化数组形式载入Base Workspace。此过程确保了时间轴严格同步、采样点一一对应,为后续多波形精准叠加奠定数据一致性基础。 其次,在绘图实现层面,“同坐标”并非简单调用多次plot命令即可达成。必须深入理解MATLAB图形系统的底层架构:每个figure包含一个或多个axes容器,而每个axes可容纳任意数量的line对象。标准做法是使用hold on指令锁定当前axes,再依次plot多组x-y数据;更优方案则是采用向量化语法——如plot(x1,y1,x2,y2,x3,y3,...),MATLAB会自动为每条曲线分配不同颜色与线型,并共享同一坐标轴范围。针对不同量纲波形(如电压V与温度℃),需启用yyaxis left/right双Y轴;若需多X轴(如时间与频率映射),则需借助twinx或自定义坐标变换。此外,必须配套执行xlabel、ylabel、title、legend、grid on、box on等指令完善图表语义,其中legend应明确标注各波形物理含义(如'PWM驱动信号'、'电机转速反馈'、'PID输出误差'),避免歧义。对于高频采样大数据(如100万点),应启用plot(...,'-','Marker','none')禁用标记点以提升渲染效率,并考虑使用xlim/ylim限定视图区域防止坐标轴过度拉伸。 再者,跨软件协同是该技术落地的关键延伸。描述中提及导出至Excel与Origin,这要求掌握MATLAB的数据导出范式:对已加载的waveData数组,可用writematrix(waveData,'output.xlsx')直接写入表格,或用xlswrite(旧版)、writematrix+writematrix组合导出多列;对于Origin,则推荐生成符合其支持格式的.dat文件(空格/制表符分隔),或通过COM接口调用OriginLab自动化引擎实现无缝对接。值得注意的是,导出前务必验证数据维度——Array格式默认为M×N矩阵,第1列为时间轴,其余列为各通道波形;若为Structure格式,则需先提取waveData.time与waveData.signals.values字段重组为二维数组,否则易导致坐标错位。 最后,工程实践中需规避若干典型陷阱:一是未清空工作区导致变量名冲突;二是忽略采样率不一致引发的时间轴偏移(如两路信号采样率分别为1kHz与10kHz,须先重采样对齐);三是legend顺序与plot调用顺序不匹配造成标签错位;四是未设置FontSize、LineWidth等属性致使论文插图不符合出版规范(IEEE/Elsevier通常要求字号≥8pt,线宽≥1.5pt)。综上,“matlab多波形同坐标”绝非孤立命令技巧,而是贯通建模仿真、数据采集、图形编程、结果验证与学术表达的全链条能力,其掌握程度直接反映工程师在复杂系统分析中的专业深度与工程严谨性。
recommend-type

OpenStock:开源A股行情数据抓取与自动化选股策略工具

如果你盯盘一天只能看两三次,如果你复盘时总想搞清楚“今天到底哪些票资金在进、哪些在出”,又不想每天打开行情软件被广告和荐股弹窗轰炸,那“OpenStock”这个开源项目可能会刚好踩中你的需求。 OpenStock是一套面向个人投资者的开源行情数据抓取与分析工具,核心理念很简单:把A股每日的行情快照、涨跌停数据、板块资金流向、技术指标信号全部自动拉到本地,集中清洗入库,再用一套可扩展的选股策略引擎做二次筛选,最终输出你真正关心的“可以复盘、可以跟踪、可以留档”的数据结果。它适合三类人:一是没有编程基础但想用现成脚本做常用数据留档的交易者,二是刚入门量化、想用真实行情数据练手策略的开发者,三是已