So you need efficiency too. Ok, calculate the bounding rectangles of both polygons. If the bounding rectangles don't overlap, neither polygon contains the other, so you can skip the more expensive test.
If they do overlap, check if each polygon contains points of the other in the overlap region. If polygon B contains some points of polygon A, but not others, then B doesn't contain A.
I am posting on the server side application using a "Response.Write(str)" statement, where "str" contains some XML code .
On the client side I am getting the response using a HttpWebResponse .
When I get the HttpWebResponse content , I find , apart from the correct XML code that I posted on server side, soem kind of strange trailer which resembles an Html page, but is absolutely random (I mean , this "html page" changes from session to session...) .
What is the reason of this strange result ? I am posting some relevant code below to help explain :
I'm guessing that you're calling Response.Write from the code-behind of an ASP.NET page? In which case, the content of the page will still be output to the response after the text you've passed to the Response.Write method. You'll need to call Response.End after your last call to Response.Write to prevent this.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
If the user name was linked to their Windows Identity, then you can use that. If, however, your site uses a custom login mechanism or something like OAuth, then the user is going to have to associate their identity with the notification application - this would typically require you to provide a settings page where they entered their user name and password details so that you could verify that they were a valid user.
To be honest, this opens a whole can of worms, including things such as verifying that web service requests haven't been intercepted and so on. A simpler method would just be to email them.
I was brought up to respect my elders. I don't respect many people nowadays.
I am getting a timeout message when accessing a linq to sql object in a C# 2010 application. This error message is occuring when I am doing a select in the linq to sql object. thus can you tell me how I can increase the timeout on the linq to sql data set object? The following os the error message I am getting:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
2013-01-24 16:40:03.3082|ERROR|Sample|************* Stack Trace *******************
2013-01-24 16:40:03.3238|ERROR|Sample| at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Booleanasync)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object parentArgs, Object userArgs, ICompiledSubQuery subQueries, Object lastResult)
at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo queryInfos, IObjectReaderFactory factory, Object userArguments, ICompiledSubQuery subQueries)
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)