|
Hi Keshav,
Thanks for your reply.
And i tried it like this. here is the code for ur ref
I am running it in the console application
Matrix.cs file
<br />
namespace MatrixAddition<br />
{<br />
public class Matrix<br />
{<br />
public double[,] Data;<br />
public Matrix(double[,] data)<br />
{<br />
<br />
Data = data;<br />
}<br />
public static Matrix operator +(Matrix M1, Matrix M2)<br />
{<br />
int r1 = M1.Data.GetLength(0); <br />
int c1 = M1.Data.GetLength(1);<br />
int r2 = M2.Data.GetLength(0);<br />
int c2 = M2.Data.GetLength(1);<br />
<br />
double[,] res = new double[r1, c1];<code>
for (int i = 0; i < r1; i++)
{
for (int j = 0; j < c1; j++)
{
res[i, j] = M1.Data[i, j] + M2.Data[i, j];
}
}
return new Matrix(res);
}
}
}
them i am trying to call it in the main fumction but i could not able to get it.
pls correct my code in the matrix.cs page and tell me how to call it in the main program.
waiting for reply
regards,
chitra.
|
|
|
|
|
I am not sure but this might help you. this is a simple link explaining, how functions are called in the main class.
http://fullycoded.com/?p=203
Keshav Kamat
India
|
|
|
|
|
Thanks for your help .
regards,
chitra.
|
|
|
|
|
u r welcome
Keshav Kamat
India
|
|
|
|
|
Hi there, I'm trying to design a simple GPS mapping system for a Windows Mobile 5 platform, but I'm having trouble with displaying maps. At the moment I am only trying to get the system working for a small area, for which I have a 6Mb JPEG map. Trying to load this in VS2k5 causes a memory error as you might expect; my plan is to work out what part of the map I need to load, and somehow only load a cropped area of the larger image. I have searched through Code Project and spent hours on Google, but can't find anything I can use to perform this task. I have thought about streaming the file and selecting only the part that I need, but don't want to invest so much time into coding that if there is a more simple solution out there. Any help would be much appreciated.
Regards,
Simon Hearne
|
|
|
|
|
To unpack only a part of a jpeg image would be done by unpacking the entire image and only keep the part you want. I don't know of any library that does this, so you would probably have to write your own jpeg decoder. This does definitely not fall into the category of "not so much time into coding", though.
I would suggest that you split up the image into small sections and save as separate images, so that you can load the secions that you need.
---
single minded; short sighted; long gone;
|
|
|
|
|
I'm experimenting with opening a word document from a template and then changing some values. Have found some CP articles and other sources, but most of them are outdated (using interop 9 or 10 instead of 11). The problem lies here:
ApplicationClass oWordApp = new ApplicationClass();<br />
<br />
object missing = System.Reflection.Missing.Value;<br />
object oTemplate = "RappelTemplate.dot";<br />
Document oWordDoc = oWordApp.Documents.Add(<br />
ref oTemplate,<br />
ref missing, <br />
ref missing, <br />
ref missing);<br />
<br />
object oBookMark = "bedrag";<br />
oWordDoc.Bookmarks[ref oBookMark].Range.Text = "100";<br />
<br />
oWordDoc.Activate();<br />
oWordApp.Visible = true;
this line gives compile errors, because ref is an invalid expression term, and instead of oBookMark, "]" is expected. Nevertheless this is the only solution I can think of. It has to be ref, and it has to be oBookMark...
Any hints?
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hey ya'll,
I want to create links to URLs shown in the Browser. Is there a way to capture the current URL being shown in browser?
I can do it with cut and paste but can't figure how to do it by drag drop method. I guess my question would be is there a way to query browser for this info??
Thanks
Mike
If you can't find time to do it right the first time how are you going to find time to do it again?
|
|
|
|
|
Where you want to use this ? C# application or ASP.NET web app ?
|
|
|
|
|
DooDooo wrote: Where you want to use this ? C# application or ASP.NET web app ?
I will be using this in a C# windows application. I've thought about it and I can't figure how to approach the problem. I know very little about WEB apps!
Thanks
Mike
If you can't find time to do it right the first time how are you going to find time to do it again?
|
|
|
|
|
Hi all,
We are having an issue with a WinForm app disappearing with no warning when the user does some UI actions (clicking, dragging, etc.) on various windows and dialogs. There is no sequence of events that is known to reproduce the problem and we are handling 'unhandled exceptions' through a form.
We have looked at memory usage, GDI objects, handles, stack overflows and none seem to be the cause as far as we can see. Any other reasons that could cause such a problem?
Any help is greatly appreciated.
Thanks very much
Emad
|
|
|
|
|
Just to be clear do you mean that the Application is exiting (i.e. Quits) randomly or do you mean that it disappears from the Foreground - in other words it's still running but the form is either put at the back of the other windows on the screens or minmized for example?
|
|
|
|
|
yeah the application just quits...
|
|
|
|
|
Hello everyone,
I have created a Web Service which has been refrenced and sitting the "Project Solution" of my developing enviroment.
I have no idea what to do next and was wondering if someone can take e moment and tell me what needs to be done for it to work. Even if you can point me to a tutorial would be great.
Thank you so much and have a great day.
Khoramdin
|
|
|
|
|
Basically, the stumbling block is usually in realising you need to scope the namespace of the web service. Once you do that, you can create an instance of hte class and call it's methods, the frame work will handle all the web stuff for you.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Is it possible to create an intermediary application that is able to take another application and distribute the processing across different computers, and later bring the application back together again, if so, how would I go about creating as such an application?
|
|
|
|
|
I doubt it, that would involve some serious hacking into another process. It's hard enough to write good multi thread code within your app, without trying to hijack another in a way that doesn't break it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I think you're after what .net calls Remoting. I haven't used it myself (yet), so all I can do is pass on links.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconnetremotingoverview.asp
http://msdn2.microsoft.com/en-us/webservices/aa740645.aspx
http://msdn2.microsoft.com/en-us/library/kwdt6w2k.aspx
There are lots of examples on the internet.
|
|
|
|
|
There is already a project that does this sort of thing. Look at the web site http://boinc.berkeley.edu/
Phil
|
|
|
|
|
i want to get the Login User Name in the local system in windows application
thank u
|
|
|
|
|
System.Environment.Username
/ravi
|
|
|
|
|
|
We were a 100% classic ASP shop until perhaps a year ago when we started jumping into ASP.NET. We're finally at a point where we're comfortable enough with the language to start deploying production applications. But we're running into problems because of the way Visual Studio works with a complete local copy on the developer's workstation. There's nothing specifically wrong with the way it works, it's that we don't know how to handle multiple developers on the same project.
We typically use Dreamweaver to directly edit copies of the files on the server via FTP. It's simple to connect via Dreamweaver, open up the ASP file, make your changes, save, and you're done, the new code is running live on the site.
Right now, about all we can do is download a fresh copy of the ASP.NET site each time we want to make a change - obviously time-consuming. We all telecommute so we can't have the source code on a share that we can all access.
Is there a product out there that will allow us to remotely synchronize our versions? I've seen the SourceGear vault, that seems like it might fit the bill. Does anybody have any experience with this product, or have any recommendations?
|
|
|
|
|
|
Sourcesafe is universally acknowledged as the worst versioning software ever created. MS doesn't even use it. (My last experience there was with SourceDepot, which is a customized version CVS, iirc).
We happily use Subversion. Tortoise is just a GUI front-end to Subversion, which is commandline in nature. There is also a Visual Studio interface to Subversion, called Ankh.
|
|
|
|