alanchinese
Avatar/Signature-
Posts
62 -
Joined
-
Last visited
About alanchinese
- Birthday 08/30/1978
alanchinese's Achievements
Newbie (1/14)
0
Reputation
-
Say I have 1,000 assemblies, each one changes fairly frequently with change effective dates. What's the best way to determine which set of assemblies to use for a specific "as of date"? Thanks, Alan.
-
I want to write an automated testing tool in .Net. For example, i have a winform including two textboxes (input) and one label (output): 1) open up the winform application 2) type numbers in two text boxes and click "calculate" button 3) verify the result in the label. I know that my testing tool can open up the application (using process). How do I achieve #2 and #3?
-
Hi, I have a aspx (with ajax control toolkit) that the code behind calls a method from another assembly. This method will call 100 other methods thus it will take long time. Is there any pattern/best practices on how to display progresses on this long method call? (i.e., at 10:00am, method 1 is started, 10:05am, method 1 is completed, ... etc). Event could be used to let the code behind to catch the progress messages. Thanks for any suggestion, Alan.
-
Hi, I have a request and response queue. I also have an XSLT. I want to receive XML messages, use the XSLT to transform the request, and place the transformed messages into the response queue. Is it possible to perform the above without file IOs? Any recommendation on scalability and performance? Thanks, Alan.
-
What's the most efficient way to read a portion of data from a 100MB file, where I already knew the starting position and the length I need? Thanks a lot, Alan.
-
Hi, Is there a simple and efficient way to create an XML from a segmented string? For example, I would like to convert the following string (is there a better name for this kind of strings?): SEG_ROOT_START*1234~ SEG_LVL1*A*B~ SEG_LVL2*8~ SEG_LVL1*X*~ SEG_ROOT_END~ into: <SEG_ROOT> <SEG_LVL1> <SEG_LVL1_01>A</SEG_LVL1_01> <SEG_LVL1_02>B</SEG_LVL1_02> <SEG_LVL2> <SEG_LVL2_01>8</SEG_LVL2_01> </SEG_LVL2> </SEG_LVL1> <SEG_LVL1> <SEG_LVL1_01>X</SEG_LVL1_01> <SEG_LVL1_01 /> </SEG_LVL1> </SEG_ROOT> In this example, The root segment has two forms, one for begin, one for end. We need to parse this specially There are two levels, LVL1 (expecting two string childrens) and LVL2 (expecting one integer child) Level LVL2 can only be children of LVL1 When an expected value shows an empty string, the corresponding XML node shouuld be NULL. Currently, we are reading and parsing these strings manually. I am wondering if there are existing ways (regular expressions, maybe?) so that we can convert them into XMLs. We can do the following with the XMLs: Data validation once XSD is defined. Data transformation once XSLT is defined. Data transmission via web services. Thanks a lot for any information or suggestions, Alan.
-
Hi, I have a simple grid view accepting query "SELECT * FROM LARGE_TABLE". One of the columns contains a string with 1000 characters. How should I do to force all the columns not to wrap without specifying each column? Thanks, Alan.
-
Is it possible to retreive contents in files in sharepoint from a .net application? I want to display part of the file in asp.net.
-
hi, the asp.net server uses active directory for authentication. in iis, the anonymous access is unchecked and windows authentication is check. however, page.user.identity.name returns empty string. what is the cause? the following code <code> Response.Write( "Page.User Identity: [" + Page.User.Identity.Name + "]<br>" ); Response.Write( "Window.Current Identity: [" + System.Security.Principal.WindowsIdentity.GetCurrent().Name + "]<br>" ); Response.Write( "Thread.Current Identity: [" + System.Threading.Thread.CurrentPrincipal.Identity.Name + "]<br>" ); </code> derives these results: Page.User Identity: [] Window.Current Identity: [NT AUTHORITY\NETWORK SERVICE] Thread.Current Identity: []
-
Registering and unregistering an object to a transaction.
alanchinese replied to alanchinese's topic in General
To make it simple, the first insert is "optional". That means, it's not significant to commit the first insert even though it belongs to part of the business logic. When it fails, it's designed to be ignored and all the other queries need to be commited. Another occassion is, when the network connection fails for a temporary 2 minutes, calling the ExecuteNonQuery() method will get a TCP-IP error. I want to be able to catch this specific error and wait for 3 minutes before I attemp a new connection and call ExecuteNonQuery() again. However, when the Transaction.Commit() method is called, the TCP-IP error is still counted as a failed enlistment. I cannot find a way to get rid of that bad apple. Everything would be rolled back because of that. -
Registering and unregistering an object to a transaction.
alanchinese replied to alanchinese's topic in General
Anyone has a clue? I can't figure out the unregistering part. Here is the actual thing I want to do: I have a transaction, trying to execute two insert queries. It's not important if the first one is successful or not - I will catch the exception and move on, o/w commit to the db. All I care is commiting the second one. However, the Transaction.Commit() will roll back everything if the first one fails. -
Hi, In the "Remarks" section of System.Transactions.CommitableTransaction.Commit() method, it says Can anyone post some sample codes on how an object is registered to a transaction, and how this object itself get unregistered? I am catching one of the ExecuteNonQuery failures and want to retry again. The current transaction's TransactionInformation.Status is "Active" until after the Commit() method call. I think it detects there was at least one failure but I don't know how to clean it up before the Commit() call. Thanks a lot, Alan.
-
Hi All, I am wondering if there are any discussion about the benchmark of .Net serialization and deserialization? In my web server, the combined time of serialization and deserialization of a 8K xml is half a second. I am wondering what I can do to improve the performance? Thanks for all of your inputs, Zhong.
-
Hi, I am wondering if I can make a simple program (command line, win form, or script) to capture the time when the mouse's left button is clicked (or any special combination, like CTRL + Left Click) anywhere in the window. I might also want to extend this utility to record times in multiple clicks, and calculate the time difference between two clicks, etc. Have anyone had done something like this? Thanks for any inputs or ideas, Zhong.