2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
Java社区进程(JCP)执行委员会的成员Ben Evans认为最急需重构的应用恰好就是最适合进行模块化的应用。如果你已经备受Lava Flow/God Class/Stovepipe System地狱的折磨,而且你的利益相关方明确知道这一点,那么你可能更容易说服他们进行一次完整的底层重构,通过渐进式的努力形成一个完成的模块解决方案(而不是简单重构并迁移至Java 8)是值得去做的。
对特定类型的应用来说,这是很有帮助的。例如,我曾经见到有的电子商务网站具有非常大的堆空间,其中包含了大约40G的字符串数据。Java 9的ompact Strings技术能够将这种类型的内存使用减半。这反过来又会对GC的性能带来积极的影响。对于有些应用来说(这可能就包括大型的Solr安装环境及类似场景),单单这一项收益就值得将运行时升级到Java 9。
这项变更是很重要的,因为相对于Parallel来说,G1会在应用线程上做更多的事情,而Parallel几乎没有在应用线程上做任何事情,它基本上完全依赖GC线程完成所有的内存管理。这意味着切换到G1将会为应用线程带来额外的工作,从而直接影响到应用的性能。 在很多(甚至可以说大多数)场景中,这种额外的性能损耗都不是什么问题。但是,在这方面,我确实也曾经见过从Parallel切换到G1时,有一定比例的工作负载会引起性能的下降。对于这些应用来说,这种性能下降是无法接受的,所以他们无法切换至G1收集器。随着G1成为默认的收集器,这将会影响到升级至Java 9的每个应用。
DWObject.OpenSource(); DWObject.IfShowUI = false; DWObject.IfDisableSourceAfterAcquire = true; DWObject.PixelType = EnumDWT_PixelType.TWPT_BW; //Black - White image : EnumDWT_PixelType.TWPT_BW, GRAY image: EnumDWT_PixelType.TWPT_GRAY, RGB image: EnumDWT_PixelType.TWPT_RGB DWObject.AcquireImage();
function BeginScan(){ DWObject.OpenSource(); DWObject.IfShowUI = false; //set without user interface DWObject.IfDisableSourceAfterAcquire = true; DWObject.AcquireImage(); } function DWObject_OnPostTransfer(){ DWObject.SaveAsBMP("C:\\temp.bmp",0); }
DWObject.SelectSource(); DWObject.OpenSource(); DWObject.IfShowUI = false; //Set Image Layout DWObject.Unit = EnumDWT_UnitType.TWUN_INCHES; DWObject.SetImageLayout(0, 0, 5, 5); DWObject.AcquireImage();
DWObject.OpenSourceManager(); for(i = 0, i<=DWObject.SourceCount - 1,i++){ if (DWObject.GetSourceNameItems(i) == "Specified device name") DWObject.SelectSourceByIndex (i); } //if can't find the specified source, it'll select default source DWObject.AcquireImage();
DWObject.IfShowUI = false; DWObject.IfDisableSourceAfterAcquire = true; DWObject.OpenSource(); DWObject.IfShowIndicator = false; DWObject.AcquireImage();
DWObject.SelectSource(); DWObject.OpenSource(); //Set XRESOLUTION current value. DWObject.Capability = 0x1118; //ICAP_XRESOLUTION DWObject.CapType = 5; //TWON_ONEVALUE DWObject.CapValue = 300; if (DWObject.CapSet == false){ alert( "Failed to set the x-resolution. " + DWObject.ErrorString); } //Set YRESOLUTION current value. DWObject.Capability = 0x1119; //ICAP_YRESOLUTION DWObject.CapType = 5; //TWON_ONEVALUE DWObject.CapValue = 200; if (DWObject.CapSet == false){ alert( "Failed to set the y-resolution." + DWObject.ErrorString); } DWObject.AcquireImage();
DWObject = document.getElementById("dwtcontrolContainer"); //dwtcontrolContainer is the id of the Dynamic Web TWAIN on the page (An object or an embed). function btnScan_onclick() { DWObject.SelectSource(); DWObject.OpenSource(); DWObject.AcquireImage(); } function btnUpload_onclick() { var strActionPage; var strHostIP; var CurrentPathName = unescape(location.pathname); // get current PathName in plain ASCII var CurrentPath = CurrentPathName.substring(0, CurrentPathName.lastIndexOf("/") + 1); strActionPage = CurrentPath + "SaveToFile.aspx"; //the ActionPage's file path strHostIP = "localhost"; //The host's IP or name DWObject.HTTPPort = 80; DWObject.HTTPUploadThroughPost(strHostIP,0,strActionPage,"imageData.tif"); if (DWObject.ErrorCode != 0) alert(DWObject.ErrorString); else //succeed alert("Image Uploaded successfully"); }
var iDocumentCounter =0; function BeginScan(){ DWObject.OpenSource(); DWObject.IfShowUI = false; DWObject.IfDisableSourceAfterAcquire = true; if(DWObject.Duplex != TWDX_NONE) DWObject.IfDuplexEnabled = true; //enable duplex DWObject.IfFeederEnabled = true; if (DWObject.IfFeederEnabled == true){ DWObject.XferCount = -1; if(DWObject.IfFeederLoaded == True) DWObject.AcquireImage(); } } function DWObject_OnPosttransfer(){ iDocumentCounter = iDocumentCounter + 1; if(DWObject.SaveAsBMP("C:\\Image\\" + iDocumentCounter + ".bmp", 0) == false) alert( DWObject.ErrorString); }
function btnUpload_onclick() { DWObject.HTTPPort = 80; DWObject.IfSSL = false; // if 80 is the port number of non-secure port /* DWObject.HTTPPort = 443; DWObject.IfSSL = true; // if 443 is the port number of secure port */ DWObject.HTTPUploadThroughPost("127.0.0.1", 0, "/SaveToFile.php", "imageData.jpg"); if (DWObject.ErrorCode != 0) alert(DWObject.ErrorString); else //succeed alert("Successful"); }
function Scan_Click(){ DWObject.AcquireImage(); } function DWObject_OnPostTransfer(){ DWObject.CloseSource(); DWObject.IfTiffMultiPage = true; DWObject.SaveAsTIFF("SaveAsTIFF.tif", 0); if (DWObject.ErrorCode != 0) alert (DWObject.ErrorString); else //succeed alert ("Successful"); }
function NextImage_Click(){ if (DWObject.HowManyImagesInBuffer == 0) alert ("There is no image in buffer"); DWObject.CurrentImageIndexInBuffer += 1; } 13.如何进行双面扫描? function DuplexScan_Click(){ DWObject.SelectSource(); DWObject.OpenSource(); DWObject.IfShowUI = false; DWObject.IfDuplexEnabled = true; //enable duplex DWObject.AcquireImage(); }
From: POSTMASTER@domain.com To: jdoe@domain.com Subject: Message Delivery Failure MailEnable: Message Delivery Failure. The following recipient(s) could not be reached: Recipient: [SMTP: bill@domain.com] Reason: The message could not be delivered because the domain name (domain.com) does not appear to be registered.
From: MAILER-DAEMON@domain.local To: jdoe@localhost Subject: Undeliverable mail: Failed to deliver to ''
// Create POP3 object Pop3 pop = new Pop3(); // Enable logging to file pop.Log.Enabled = true; pop.Log.Filename = @"C:\log.txt"; pop.Log.Clear(); // Connect to POP3 server pop.Connect("mail.domain.com"); pop.Login("bounce", "secret"); // Download headers and bodies of all messages. MailMessageCollection msgs = pop.DownloadMessageHeaders(1, -1, -1); // Loop through all messages in the mailbox foreach (MailMessage msg in msgs) { string strLine = msg.BodyPlainText; Console.WriteLine("From: " + msg.From.Email); // Get failed email address string str_invalid_email = GetInvalidEmailAddressME(msg); // If str_invalid_email is non-empty then failed email // address was found if (str_invalid_email.Length > 0) { // Remove failed email from database RemoveEmailFromDatabase(str_invalid_email); // Display invalid adress Console.WriteLine("Invalid email: " + str_invalid_email); // Delete bounced email from server to avoid // processing it next time pop.DeleteMessage(msg.IndexOnServer); } } // Disconnect from POP3 server pop.Disconnect(); // The function checks whether the message is bounced and extracts // failed address // from bounced message. Valid only for MailEnable servers static string GetInvalidEmailAddressME(MailMessage msg) { string str_invalid_email = msg.BodyPlainText; // Check if this is a bounced message report if (msg.Subject.IndexOf("Delivery Failure") == -1) { return ""; } if (msg.From.ToString().IndexOf("POSTMASTER") == -1) { return ""; } // Now we're sure this is a bounced message report int i_start; i_start = str_invalid_email.IndexOf("SMTP:"); // Check if bounced message report contains "Recipient:" field if (i_start == -1) { return ""; } // Get failed address i_start += 5; i_end = str_invalid_email.IndexOf("]",i_start); str_invalid_email.Substring(i_start, i_end); return str_invalid_email; } // The function checks whether the message is bounced and extracts // failed address // from bounced message. Valid only for Communigate Pro servers static string GetInvalidEmailAddressCP(MailMessage msg) { string str_invalid_email = msg.BodyPlainText; // Check if this is a bounced message report if (msg.Subject.IndexOf("Undeliverable mail") == -1) { return ""; } if (msg.From.ToString().IndexOf("MAILER-DAEMON") == -1) { return ""; } // Now we're sure this is a bounced message report int i_start; i_start = str_invalid_email.IndexOf("to '<"); // Check if bounced message report contains // "Failed to deliver to " field if (i_start == -1) { return ""; } // Get failed address i_start += 5; i_end = str_invalid_email.IndexOf("]",i_start); str_invalid_email.Substring(i_start, i_end); return str_invalid_email; } // This function must remove (or disable) specified // email address from mailing list static void RemoveEmailFromDatabase(string str_invalid_email) { // TODO: Add your code here }
Dim pop As New Pop3 ' Enable logging to file pop.Log.Enabled = True pop.Log.Filename = "C:\log.txt" pop.Log.Clear() ' Connect to POP3 server pop.Connect("mail.domain.com") pop.Login("jdoe", "secret") ' Download headers and bodies for all messages. Dim msgs As MailMessageCollection = pop.DownloadMessageHeaders(1, -1, -1) ' Loop through all messages in the mailbox Dim msg As MailMessage For Each msg In msgs Dim strLine As String = msg.BodyPlainText Console.WriteLine("From: " + msg.From.Email) ' Get failed email address Dim str_invalid_email As String = GetInvalidEmailAddressME(msg) ' If str_invalid_email is non-empty then failed email ' address was found If str_invalid_email.Length > 0 Then 'Remove failed email from database RemoveEmailFromDatabase(str_invalid_email) ' Display invalid address Console.WriteLine("Invalid email: " & str_invalid_email) ' Delete bounced email from server to avoid ' processing it next time pop.DeleteMessage(msg.IndexOnServer) End If Next Console.ReadLine() ' Disconnect from POP3 server pop.Disconnect() ' The function checks whether the message is bounced and extracts ' failed address ' from bounced message. Valid only for MailEnable servers Function GetInvalidEmailAddressME(ByVal msg As MailMessage) As String Dim str_invalid_email As String = msg.BodyPlainText ' Check if this is a bounced message report If msg.Subject.IndexOf("Delivery Failure") = -1 Then Return "" End If If msg.From.ToString().IndexOf("POSTMASTER") = -1 Then Return "" End If ' Now we're sure this is a bounced message report Dim i_start As Integer, i_end As Integer i_start = str_invalid_email.IndexOf("SMTP:") ' Check if bounced message report contains "Recipient:" field If i_start = -1 Then Return "" End If ' Get failed address i_start += 5 i_end = str_invalid_email.IndexOf("]", i_start) str_invalid_email.Substring(i_start, i_end) Return str_invalid_email End Function ' The function checks whether the message is bounced and extracts ' failed address ' from bounced message. Valid only for Communigate Pro servers Function GetInvalidEmailAddressCP(ByVal msg As MailMessage) As String Dim str_invalid_email As String = msg.BodyPlainText ' Check if this is a bounced message report If msg.Subject.IndexOf("Undeliverable mail") = -1 Then Return "" End If If msg.From.ToString().IndexOf("MAILER-DAEMON") = -1 Then Return "" End If ' Now we're sure this is a bounced message report Dim i_start As Integer, i_end As Integer i_start = str_invalid_email.IndexOf("to '<") ' Check if bounced message report contains ' "Failed to deliver to " field If i_start = -1 Then Return "" End If ' Get failed address i_start += 5 i_end = str_invalid_email.IndexOf("]", i_start) str_invalid_email.Substring(i_start, i_end) Return str_invalid_email End Function ' This function must remove (or disable) specified ' email address from mailing list Sub RemoveEmailFromDatabase(ByVal str_invalid_email As String) ' TODO: Add your code here End Sub
Essential Studio企业版是一个企业级界面开发工具包,包含800多个.NET和JavaScript平台的组件和框架。使用Essential Studio企业版,开发者可以创建丰富的应用程序,并轻松地集成商业智能分析和报告解决方案。Essential Studio企业版是世界级的软件组件,它使得开发者能在最苛刻的环境下开发出高质量的软件。
Essential Studio 2017 v4最新版下载>>>
Essential Studio 2017 v4更新内容
JavaScript
充分利用JavaScript
• Essential JS 2是下一代的JavaScript组件套件
• 支持Ember框架
• 新的组合框架
Xamarin.Forms
构建跨平台的应用程序
• 新的图表控件
• 数据网格的多列分组
• 图像编辑器的缩放和平移功能
Xamarin.iOS
用C#创建优秀的iOS应用程序
• 新的图表控件
• 图像编辑器的缩放和平移功能
Xamarin.Android
用C#开发Android应用程序
• 新的图表控件
• 图像编辑器的缩放和平移功能
ASP.NET Core
发布卓越的Web应用程序
• 新的日期范围选择器
• 新的组合框
• 新的pivot客户端控件
ASP.NET MVC
创建Web应用程序
• 新的组合框
• 服务器下拉列表
• 树形网格控件的堆叠标题
ASP.NET Web Forms
开发大师级网站
• 新的组合框
• 服务器下拉列表
• 树形网格控件的堆叠标题
UWP
开发跨Windows生态系统
• 新的图像编辑器
• 史密斯图
• 支持富文本框从右到左
WPF
桌面控制
• 史密斯图
• 数据网格的行拖放
• 支持富文本框从右到左
Windows Forms
创建更好的APP
• 电子表格的数组公式计算
• 日期时间选择器的Office 2016主题
• ribbon控件的快速访问工具栏图标功能