"would you want Microsoft to use an inefficient version of .GetHashValue for the x64 versions of .net, or should it use efficient ones?" ...it depends on how it affects me :laugh: oh well, for me, a nuisance thats all - thanks for enlightening me! :thumbsup:
francoisdotnet
Posts
-
MD5CryptoServiceProvider's ComputeHash doesn't match (x86 vs x64)? -
MD5CryptoServiceProvider's ComputeHash doesn't match (x86 vs x64)?Thank you for your comment. I agree, between versions (or even builds) an implementation should be allowed to change and also to change its return value. But here we are talking about exactly the same "implementation" (of the method) behaving on differently depending on the platform/CPU (x86 vs x64). As much as your comment makes sense, I can't see how it applies to the same implementation across CPU - am I missing something? PS: The "sucks" was just venting my frustration :sigh: as my newly found wisdom has caused me quite an substantial bit of extra work :doh:
-
MD5CryptoServiceProvider's ComputeHash doesn't match (x86 vs x64)?Well, I think I have narrowed it down to the "GetHashCode" being the culprit! After replacing the "GetHashCode" with my own hash function it seems to work in both x86 and x64 OSs.
For Each c As DataColumn In ds.Tables("mytable").Columns
If Not c.ColumnName = "hashvalue" ThenIf r(c) IsNot DBNull.Value Then RowHash += r(c).**GetHashCode**.ToString End If
Next
' ... compare the "RowHash" with the one stored in the "hashvalue" column ...
This article seem to agree. "... the .NET Object.GetHashCode() method, which unfortunately differs between x86 and x64 systems." Any have any clue why?? That sucks (nothing in the documentation)!
modified on Wednesday, August 19, 2009 3:47 AM
-
MD5CryptoServiceProvider's ComputeHash doesn't match (x86 vs x64)?Hi All Hopefully someone can help shed some light for me. I have some code I have used for years to calculate and store (in SQL Server database), and retrieve and compare a hash value using ComputeHash of the MD5CryptoServiceProvider. I have recently upgraded to x64 (Windows 7) from x86 (Vista) but now my hashes calculated on the x86 does not match when compared (using x64)! (Hope that all makes sense.) Is there any obvious reasons for this? Where should I be looking?? thanx
-
Has Anyone Tried This? -
Anyone crazy enough to run Win7 beta as their primary OS?Does the Vista drivers work for Windows 7? I am also thinking about installing it on my laptop but not too sure about the drivers?:confused:
-
Looking For A Tool...Has no one mentioned standard Offline Files/Folders?
-
"View Thread"Is it just me or is this function not working? I also find that clicking on the next or previous page pring up the 1st page? (Vista SP1 & IE7)
-
Linq Deferred Execution vs Fetching data on a separate threadThanks for your input Dideon, I agree with you deferred execution doesn't solve the problem threading solves. The problem it creates is that even thought the LINQ query is in the background thread it doesn't execute the call to the database until much later, that is until back in the UI thread (most of the time). As the other article I posted suggests, there are ways to "force" LINQ to execute in the background thread but I don't think that is ideal as it kind of defeats some of the porpose of LINQ. For now I have decided to stay away from LinqToSql for bigger projects. Still using and loving Linq in general though ;)
-
Linq Deferred Execution vs Fetching data on a separate threadhttp://channel9.msdn.com/forums/Coffeehouse/402104-DataContext-Linq-to-SQL-and-Win32-best-practices/[^] The above discussion seems to in the direction of: don't use LinqToSQL for "bigger" production and/or enterprise applications as it is not mature enough yet?
-
Linq Deferred Execution vs Fetching data on a separate threadThus far (before 3.5) I have been using a separate thread when fetching data from a data source. Especially if (a) it is a substantial amount of data or (b) the SP tends to take a while due to data-processing. This keeps the UI snappy until the data arrives! But now with LinqToSQL and deferred execution, the data is fetched at the last possible moment. Does one abandon either threading or LinqToSQL, or is there a way to integrate them, and if so what would be the best way? I'd really like to hear everyone's thoughts and ideas!
-
So how well can you see colours?3! yoohoo :cool: One's monitor must surely have an affect too .. I have a ATI Mobility Radeon X600 on my HP 15.4" Widescreen NB?
-
Getting a Sotored Procedure to return multiple Rows into a Linq Table ObjectIt seems like it is an issue with datatypes not being the same between the result of the SP and the table data class, there seem to be a mismatch...
-
Getting a Sotored Procedure to return multiple Rows into a Linq Table ObjectI know it does seem similar, I read through the previous post in detail but it does not seem like the same problem. (Or maybe it is? :confused:)
<FunctionAttribute(Name:="dbo.phy\_data\_onmonth")> \_ Public Function phy\_data\_onmonth(<Parameter(DbType:="Int")> ByVal yearvalue As System.Nullable(Of Integer), <Parameter(DbType:="Int")> ByVal monthvalue As System.Nullable(Of Integer)) As ISingleResult(Of phy\_data) Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod, MethodInfo), yearvalue, monthvalue) Return CType(result.ReturnValue, ISingleResult(Of phy\_data)) End Function
(Not sure if you wanted the code, XML or SQL?) My SP doesn't return multiple "datasets", only multiple rows of the phy_data table (of the year and month in the parameters), it is a pretty normal
SELECT
SP. So instead of wanting to do a Linq query I rather want the SP to return the data to my phy_data Linq to SQL object. rgds, f -
Getting a Sotored Procedure to return multiple Rows into a Linq Table ObjectHi, this one is got the better of me ... I have set the SP's output in the dbml file to the table's data class, but when i try: Dim c As New dc_phyDataContext(StoredConnectionString) Dim d As List(Of phy_data) = c.phy_data_formonth(YearVal, MonthVal).ToList I get: System.InvalidCastException: Specified cast is not valid. at System.Data.SqlClient.SqlBuffer.get_Boolean() at System.Data.SqlClient.SqlDataReader.GetBoolean(Int32 i) at Read_phy_dailydata(ObjectMaterializer`1 ) at System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at ..(reference to the above code).. End goal is to have the table object contain the data for databinding purposes in order for me to later call SubmitChanges. Any ideas on what might be wrong? Or maybe another way? rgds, f
-
Work Laptop Recommendationsbut it will be too long, at least for me, before these new quad-core's become affordable...
-
Work Laptop RecommendationsI quite like the Dell Vostro's but it seems none of them come with a 7200rpm SATA? .. I think 7200rpm is essential! Am I not looking in the right place?
-
Work Laptop RecommendationsAnyone used a HP 8510w ? Intel Core 2 Duo T9300 (2.5Ghz 6MB Cache 800 Mhz FSB) 2048MB DDRII 667MHz 1 DIMM 200 GB 7200rpm LightScribe DVD+/-RW DL SuperMulti - Fixed Bluetooth Module,Intel 802.11 a/b/g/n mini-pci card 15.4 WSXGA+ WVA ATI FireGL V5600 256MB (512MB HyperMemory)
-
Work Laptop Recommendationskinda defeats the "portability" of a laptop doesn't it?
-
Work Laptop Recommendations.. can't wait for the quad core laptop anymore :^) I was hoping to get one beut seeing that Intel has still not released one I will have to settle for a dual core. Has anyone bought a new laptop recently they can recommend? It is mainly for development work (with VS2008) so 16" upwards is essential! I am also a fan of the left "Ctrl" button on the OUTSIDE, the "Fn" on the inside. (Yes, I know you can swap them in the BIOS but that is not the same! :-O ) Would like to hear your opinions ... F