|
|
it seems your asking not on the class itself, but about matrix manipulations. this is usualy referred to in basic linear algebra courses. you can easily find links such as:
http://www.isr.umd.edu/~austin/aladdin.html#sec3[^]
anyway, the basic idea is that you can do arithmetics with matrices (and vectors), in a way that somewhat resembles number (scalar) arithmetics. These arithmetics can have functional and gerometrical meanings.
|
|
|
|
|
Oh come on - it's all in the .NET Framework SDK which you should already have installed! Look it up in the documentation. how do you expect to learn anything?!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
thanks Heath,
i installed sdk and use it but i want more explanation.
Roya
|
|
|
|
|
Then you really should be a little more specific in your question. Asking what they do when the .NET Framework SDK class documentation for the Matrix clearly states what they is asking for trouble.
If you don't understand matrix calculations - because, frankly, the method names are self-explanitory even without reading the documentatin - I suggest you do a google search on matrix operations[^], or something similar.
This forum is for programming questions, and while a basic understand of matrix operations may lead to questions asking how to use it, your questions really seem along the lines of basic matrix operation questions. This is a class all by itself.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
You are right ,Thanks for Your frank manner and help.
Roya
|
|
|
|
|
I would like to change the background of a TabControl control, but it doesn't seem to have a BackColor property. As far as I know, there isn't a way to change its color from the default "Control" color. Any way around this?
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
Besides painting it yourself, no. The Tab Control common control - which is encapsulated by the TabControl class - doesn't even support custom drawing messages. This is why BackColor was overridden and attributed with BrowsableAttribute(false) and EditorBrowsableAttribute(EditorBrowsableState.Never) .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
That's not the response that I was hoping for , but thanks just the same.
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
When I send data from server,How can I send it?Now I'm trying to use DataSet,But I don't know how to transport byte into dataset in client.
Any other way>?
From China
|
|
|
|
|
For one, you could eliminate the need to define your own protocol if you use XML Web Services or .NET Remoting. A DataSet will be serialized to XML automatically by the Web Services and .NET Remoting serialization (XML Serialization and Runtime Serialization, respectively).
If you want to transfer something immediately, then do so. I guess I don't see what the problem is. If your client/server communication is two way (like you're own socket programming), then just send the data to the client.
For a DataSet , it's really quite easy. Create a new MemoryStream and call DataSet.WriteXml passing the MemoryStream . Now you can read the contents of the MemoryStream into a byte[] array. You could also use a StringWriter then encode the resulting string using the Encoding of your choice to get the bytes and send them down the wire.
If you're using XML Web Services or .NET Remoting via an HTTP channel, then communications is - by design - client-request/server-response only. A server cannot send the client something unless the client requests it, since the client establishes the connection. If you use .NET Remoting using an TCP channel (or a custom transport sink, which then it depends on the implementation), you can send data from the server to the client if the client has registered a sponsor with the server (or used some proprietary means of the server keeping a reference to the client).
If you need more help, please be more specific.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I've been putting the ArrayList to store instances of forms to good use. However the limitation of not being able to change the collection means its not really the ideal thing I'm looking for.
Specifically, I'm looking for a way to access instances of a form / class, and be able to change the underlying collection.
Thanks!
|
|
|
|
|
You can add, remove, and re-reference items in the ArrayList , which, BTW, is used extensively behind the scenes of all your favorite list and collection classes. Where do you get the idea it can't be changed?
If you're having a specific problem, please respond and be specific about what the problem is.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Maybe I misunderstood what you meant in your other response to the windows forms question.
> Using a foreach loop is easy - just be sure you don't change the underlying collection.
I am using a foreach loop to iterate through the collection of instances, and removing them in the destructor (instances.Remove(this)).
However that brings up some InvalidOperation exceptions regarding the collection having been changed. I thought that meant that you couldn't change the underlying collection.
|
|
|
|
|
Don't use the destructor. Override Dispose(bool) - which VS.NET does for you - and remove it there. If anything changes the collection you are currently enumerating in any thread, an exception will be thrown. The collection cannot change - no matter how it is changed - while enumerating. Period.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I strongly suspected it was an issue related to accessing an instance that has been changed. I read up about the ArrayList class, and found the problem was that I was iterating though an altered list (The foreach loop was doing the altering).
To prevent that, when the correct instance is found, the loop is broken.
|
|
|
|
|
Dear gurus,
How do you insert the single-quote character into text columns of database tables, especially with ORACLE? For example,
"INSERT INTO PRODUCT (Prod_Name, Prod_ID) VALUES ('Uncle Ken's Donuts', 1001)"
I am having this kind of problems @work...
Thanks with a million $
Khang
|
|
|
|
|
Use a double apostrophe in your string literal:
e.g. 'The main street in my home town is called Prince''s Street'
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
First, we've said this in the Forums dozens and dozens of times:
Use parameterized queries! It doesn't have to be a stored procedure, but use SqlParameters! That way, you don't have to worry about escaping your single quoted data at all. The SqlParameter class takes care of all of that for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
and will be faster too. Since the query will always be the same db server can cache the query plan and just use different values next time you call the query.
|
|
|
|
|
|
I am developing an Internet Explorer bar, much like the Search sidebar. I need to make Web requests, and generally I use mshtml.HTMLDocument for that when I'm retrieving Web pages, but occasionally I need to make a lightweight connection to a Web service, and for that I use WebRequest.
The problem is that one of my clients uses an authenticating Web proxy. Apparently they need to login once with the username/password at the beginning of an Internet Explorer session, and from then on they are authenticated. When I'm using HTMLDocument, I don't have any trouble with the proxy as I suspect IE is using the same code. However, when I use WebRequest, I get proxy authentication errors, so I know that I have to authenticate with the proxy.
With some testing, I learned that
<code>
System.Net.WebProxy proxy = System.Net.WebProxy.GetDefaultProxy();
proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
System.Net.GlobalProxySelection.Select = proxy;
System.Net.WebRequest wr = System.Net.WebRequest.Create("http://www...");
</code>
does not work, but
<code>
System.Net.WebProxy proxy = System.Net.WebProxy.GetDefaultProxy();
proxy.Credentials = new System.Net.NetworkCredential(user, password);
System.Net.GlobalProxySelection.Select = proxy;
System.Net.WebRequest wr = System.Net.WebRequest.Create("http://www...");
does.
That is, .NET does not automatically detect the user/password pair which was inputted at the beginning of the IE session. The proxy settings seem to be static as GetDefaultProxy() returns the correct proxy address and port, but the credentials are empty. Furthermore, I don't know how I would be able to establish Web connections under the current proxy session within .NET. Since I expect a possible enterprise-wide deployment with this client, and possibly other enterprises, I would like to be able to use the proxy without having to request and maintain the user's proxy password (securely).
Does anyone know a way to go about this? If I have to poke around IE's registry settings to get this information, I'll happily do so, although it would be nicer to simply use .NET framework methods (e.g. GetDefaultProxy()). I've been poking around on this topic off and on for the past week or two, and I'm fairly stumped. It seems I may have to request the authentication information during the installation process, but that seems less than ideal.
Thanks!
Arun
|
|
|
|
|
.NET may not - as you've notice - grab the credentials for the authenticating proxy, nor does WebProxy.GetDefaultProxy pick-up dynamic proxy settings (a la script, as many networks use). The default credential cache only works for NTLM, negotiate, and Kerberos authentication. Which does the proxy use? Also keep in mind that any older proxies - like those that may redirect to a login page - are not supported.
As far as IE's credentials it grabs for proxy authentication, this information is not stored in shared memory. While your .NET control runs within the IE process, it may not have access to the security context. Only a little testing will tell for sure.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I asked my client to talk to his IT. This is the response:
If you are talking about our outgoing proxies used by internal browsers to access the Internet, we use NetApp proxies. The authentication methods allowed are NTLM and Basic Auth. Let me know if this is or is not what you are looking for.
Is that consistent with your comments above? The default credential cache didn't seem to work in my tests.
|
|
|
|
|
The big question is how the browsers are configured. Most corporate networks these days seem to use automatic configuration through a script like I mentioned before. WebProxy.GetDefaultProxy will not pick this information up automatically, so you would have to configure these settings yourself and set the instance of your WebProxy to the HttpWebRequest.Proxy property. If you read about the HttpWebRequest.Proxy property in the .NET Framework SDK, you will find more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|