Java for C#程序员
摘要:该文章从Java的C#程序员的角度概述了Java和C#编程语言之间的差异。这种比较不是百科全书式的,而是强调了一些潜在的麻烦或其他显着的基本点。在适当的地方注明了Java SE 5-11主要版本中引入的新功能。 由于两种语言都与它们各自的运行时紧密相关,因此,我还将介绍Java虚拟机(JVM)与.N
阅读全文
posted @
2019-10-08 23:11
Maxwell Hu
阅读(411)
推荐(0)
Convert Geometry data into a Geography data in MS SQL Server
摘要:DECLARE @geog GEOGRAPHY;DECLARE @geom GEOMETRY;SET @geom = GEOMETRY::STGeomFromText('POLYGON ((-99.213546752929688 19.448402404785156, -99.21579742431...
阅读全文
posted @
2015-09-14 11:00
Maxwell Hu
阅读(303)
推荐(0)
Oracle ODP.NET连接池
摘要:数据库连接池 连接池是数据库连接的缓存,每当应用程序需要连接数据库时向连接池申请数据库连接,连接池负责具体数据库连接的创建和销毁。连接池中的数据库连接会缓存一段时间,后续的连接请求首先使用缓存中的数据库连接,如果缓存中有空闲的连接则直接使用,无空闲连接时就去新创建。这样可以提高因数据库连接创建而额外
阅读全文
posted @
2015-01-21 13:44
Maxwell Hu
阅读(2797)
推荐(2)
.NET Async/Await 最佳实践
摘要:.NET 异步编程Guildlines名称描述例外Avoid async voidPrefer async Task methods over async void methodsEvent handlersAsync all the wayDon’t mix blocking and async ...
阅读全文
posted @
2014-12-04 10:40
Maxwell Hu
阅读(936)
推荐(0)
ASP.NET浏览器定义文件及IE兼容模式
摘要:由于ASP.NET4.0中的一个小bug,导致了ASP.NET WebForms控制的CallBack无效,部分控件无法使用。解决方法是在项目中添加自定义的浏览器定义文件,参考这里:http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectI...
阅读全文
posted @
2014-06-25 17:46
Maxwell Hu
阅读(2313)
推荐(0)
IBM MQ Reason 2538(MQRC_HOST_NOT_AVAILABLE) 错误原因一例
摘要:环境: .NET 4.0, MQ .NET客户端 IBM.XMS(v2.0.0.3)测试代码如下: var factoryFactory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ); var _connFactory = factoryFactory.CreateConnectionFactory(); _connFactory.SetStringProperty(XMSC.WMQ_HOST_NAME, "192.168.0.65"); _connFactory.SetIntProperty(XMSC...
阅读全文
posted @
2013-12-27 15:55
Maxwell Hu
阅读(21367)
推荐(0)
Unable to create the store directory. (Exception from HRESULT: 0x80131468)
摘要:一个ASP.NET的程序,使用了MS ReportViewer报告控件,在用该控件导出生成Excel文件时,先是提示行不能超过65535。 这个是由于Excel2003的行限制的原因。由于修改成用Excel2007格式导出,用这种方法导出时报了如下错误:Unable to create the store directory. (Exception from HRESULT: 0x80131468) 错误堆栈: at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope, ...
阅读全文
posted @
2013-12-24 10:29
Maxwell Hu
阅读(877)
推荐(0)
C# 构造函数中调用虚方法的问题
摘要:请看下面代码:using System;public class A{ public A(){ M1(); } public virtual void M1(){}}public class B : A{ private string _method; public B(){ _method = "B_C"; } public override void M1(){ Console.WriteLine("Type:{0}, in B, {1}",GetType(), _method.ToUppe...
阅读全文
posted @
2013-07-10 09:32
Maxwell Hu
阅读(727)
推荐(0)
windows2003 64位 iis6.0 运行32位web应用程序
摘要:适用于已安装.NET4.0的windows 2003 64位机器。系统要求: windows 2003 sp1步骤: 1. 打开命令行,转到目录:%systemdrive%\Inetpub\AdminScripts 2. 运行:cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true” 安装成功后会多一个目录:%windir%\syswow64\inetsrv 3. 重新注册32位asp.net, 运行:C:\Windows\Microsoft.NET\Framework\v4.0.30319\as...
阅读全文
posted @
2013-06-24 10:39
Maxwell Hu
阅读(270)
推荐(0)
.NET安装和配置Oracle数据访问组件(ODAC)
摘要:Many ASP.NET applications accessOracle database for the data source. Oracle supports the .NET with its Oracle Data Access Components (ODAC). By using ODAC, you do not haveto install a heavy Oracle client in the Windows server machines which have IIS for the ASP.NET applications.ODAC includesOracle I
阅读全文
posted @
2013-06-24 09:52
Maxwell Hu
阅读(1420)
推荐(0)
ODP.NET调用存储需要使用事务
摘要:今天发生在用ODP.NET调整一个存储过程时发生了两个奇怪的错误。ORA-08103: object no longer existsora-01410: invalid rowid网上都说是索引块有错误什么的,我索引也重建,表也重建了,但还是不行。奇怪的是我直接测试存储过程是有结果的。后来发现是存储过程中使用了临时表,而我在代码中又没有使用事务,当我加上事务后程序就正常了。 正常的代码像下面这样:using (var conn = SqlHelper.GetConnection() as OracleConnection) { conn.O...
阅读全文
posted @
2013-02-27 13:10
Maxwell Hu
阅读(407)
推荐(0)
DEVELOPER: ODP.NET Instant ODP.NET Deployment
摘要:Deploy ODP.NET applications instantly with Oracle Data Access Components.Deploying applications can sometimes be a challenging process, involving large, complex installations. Oracle Data Access Components 11gwith Xcopy deployment, however, enables Oracle Data Provider for .NET (ODP.NET) developers
阅读全文
posted @
2013-01-23 14:46
Maxwell Hu
阅读(455)
推荐(0)
ReportViewer在设计报告参数(SetParameter)时线程挂起(hang)
摘要:I have a web application use Microsoft ReportViewer(2012) to show report. I use LocalReport and normal DataTable to provide datasource. And the DataTable fill by ODP.NET. When i run one report everything is ok, but when i run two report at same time, one of report just wait until the another finish
阅读全文
posted @
2012-11-02 12:38
Maxwell Hu
阅读(717)
推荐(0)
Cache-and-Collect Lifecycle Management in Ninject 2.0
摘要:Warning: unless you’re interested in the nuances of lifecycle management in inversion of control systems, this post might make your eyes glaze over. However, if you’re interested in new solutions to old, difficult problems, read on.One of the most important features of any inversion of control frame
阅读全文
posted @
2012-10-15 13:38
Maxwell Hu
阅读(866)
推荐(0)
RedGate Reflector / ANTS memory profiler / ANTS performance profiler 7.5
摘要:转载:http://blog.csdn.net/wangjia184/article/details/7746089下载地址:http://115.com/file/an8ptixy#RedGateReflectorProfiler7-5.zip首先将下面3行加入到 %WinDir%\system32\drivers\etc\hosts 文件中 127.0.0.1www.reflector.net 127.0.0.1licensing.red-gate.com 127.0.0.1update.red-gate.com然后运行安装文件。安装完后开始注册。
阅读全文
posted @
2012-09-11 00:04
Maxwell Hu
阅读(828)
推荐(1)
WebForms.LocalReport.SetParameters hangs
摘要:As per our dump analysis, we found that the page is running / calling one of the STA COM component. So the thread running the page (thread 16) is unloading the AppDomain. On another thread in the process of unloading AppDomain we call GC which is normal. When we call GC, Finalizer thread goes off to
阅读全文
posted @
2012-05-02 14:09
Maxwell Hu
阅读(312)
推荐(0)
Microsoft Office 2007的ContentType
摘要:当从浏览器返回一个文件时,需要指定ContentType,以下是Office2007对应的值:"application/vnd.openxmlformats-officedocument.wordprocessingml.template" (for .dotx files)"application/vnd.openxmlformats-officedocument.presentationml.presentation" (for .pptx files)"application/vnd.openxmlformats-officedocume
阅读全文
posted @
2011-03-31 11:42
Maxwell Hu
阅读(747)
推荐(0)
本地化ASPXPivotGrid控件
摘要:当AspxPivotGrid中有统计行的时候,默认会后面加上 Total 的字样,或者是显示 Grand Total等字样. 如果要改变这些字的话,可以这样做. 1.首先继承一个PivotGridLocalizer 或ASPxPivotGridResLocalizer的子类,并覆盖GetLocalizedString方法. 2.在PrivotGrid初始化之前把这个继承的类赋给PivotGridLocalizer 的Active属性.代码类似如下:[代码]相关文章: http://www.devexpress.com/Support/Center/p/Q307806.aspx
阅读全文
posted @
2011-02-17 09:13
Maxwell Hu
阅读(1458)
推荐(0)