|
Hello Everybody,
I am using threading in my application. In which have there is a problem is occurred while executing the program for depth Algo.
if i am executing Thread for normal function then it works properly. if i execute the same thread for depth function there are generates the problem of Memory Usage and CPU usage. After that the application can't response and generate not enough memory error.
So please can u provide the help for controls the Thread if the memory is not available.
Thanks
If you can think then I Can.
|
|
|
|
|
Without the relevant code fragment, it isn't possible to answer that with absolute confidence, but I assume that your depth function is recursive, and that it is calling itself with the wrong parameters, causing it to loop on a node of some form.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
I have created a desktop app for facebook.I even got api and secret key from facebook,but it doesnt work for other user.It works good for me but it doesnt allow other user to login into the app.Plz help me
|
|
|
|
|
facebook is evil dont support them your soul will be lost... i hope that is helped you my friend
|
|
|
|
|
Yeah I know brother,but there should be some way to do this
|
|
|
|
|
rahul_galgali wrote: but it doesnt allow other user to login into the app
Without some further information about what your app is doing it is impossible to guess what might be happening.
|
|
|
|
|
rahul_galgali wrote: ,but it doesnt work for other user
What's that supposed to mean? Does it log in with your credentials, does it crash, does it complain about your key, does it say "OutOfMemoryException". What?
rahul_galgali wrote: It works good for me but it doesnt allow other user to login into the app
That could be caused by them not having .NET installed. Once you verified they have, we'll move on the the next point, being the difference between 32 and 64 bits, verifying that you're not running from a mapped network-drive, and so on.
Bastard Programmer from Hell
|
|
|
|
|
Hi
I am writing a form application to just display the movie names. I have a second class called Movie where I have hard coded two movies to dispplay in the Form class. Both Form amd Movies class are in same directlry and have same namespace. But still I am getting msg
"The type or namespacen name Movies does not exist in the namespace MoviesIsaw (are you missing an assembly reference?))
Can you pls tell me what Iam doing wrong.
|
|
|
|
|
Is the class called Movie or Movies ?
I would create both so each movie is an individual object and all movies can be added to a collection called Movies
public class Movie
{
private string name;
public Movie(string name)
{
this.name = name;
}
public string Name
{
get { return name; }
}
}
public class Movies : List<Movie>
{
}
|
|
|
|
|
Thansk muh for swift response. This is what I have
MoviesIsaw.Form1.cs
namespace MoviesIsaw
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string mn;
mn = MoviesIsaw.Movies.MovieArray[0];
testBox1.Text = mn;
}
}
}
Movies.cs
using System;
using MoviesIsaw;
namespace MoviesIsaw
{
public class Movies
{
str [] MovieArray = {"Benher","TOP GUN"};
}
}
|
|
|
|
|
|
Hooray, Tx much it works now. got the concept as well.
Two mistakes I did
did not create the object - Still thinking in my old procedural way. (11 years of it does not die that fast..)..)
Did not include the cs file part of the project
Thanks for the help and am happy about this great site..
cheers, Ravi
|
|
|
|
|
Hello,
It looks like you made a mistake somewhere in the typing and you know how ,use the word "Movies" instead of "Movie" as your seckond class is called.
It would be good to see the piece of code that is related to this error.
All the best,
Peric Zeljko
periczeljkosmederevo@yahoo.com
|
|
|
|
|
Hi,
I am facing some issue to set the IPv6 address programatically to the adapter. For IPv4 Win32_NetworkAdapterConfiguration WMI class was used to set the IP addresss.
Could some one help to share the API or any other way to set the IPv6 address.
Thanks
|
|
|
|
|
Hi,
I have a Stored Procedure in SQL server which returns multiple tables...
using IMultipleResults in Linq to SQl is there a way to fetch only one table from the result ....Please help me regarding the same....
|
|
|
|
|
Can't you cut down the stored proc to give just the results you want? Otherwise you're making the DB do more work than necessary, bad for performance and scalability.
Regards,
Rob Philpott.
|
|
|
|
|
Thanks for ur solution....but please let me know whether is it possible to fetch only the desired single result from the SP"s result set...
|
|
|
|
|
cant you just use .GetResult<T> where T is the type of result you want?
|
|
|
|
|
ya thats true but that is not giving me the desired result, we need to fetch other results also prior to this(need to follow the sequence of result sets returned from the sp)..if my result is last one in the SP.....
|
|
|
|
|
sounds like you have to seperate your mega SP into smaller SPs to me then, still cant see why this is a prob without some code
|
|
|
|
|
actually i cannot change my sp ,bcos this is used in many other places of code they fetch
particular resultset which i require....
so please let me knoiw is there a way to fetch only the resultset i need from sp using Imultiplerersults.....
As this is achievable in classic ado.net using tablemappings where we can fetch the desired resultset from SP.
please let me know how this can be achieved in Linq to SQL....
|
|
|
|
|
Hi
I have trouble understanding the code that is on this page
http://www.sanity-free.org/13/numeric_text_box_number_only_text_box_control_in_csharp.html.
In PreProcessMessage I don't understand what the inparameter Message msg property WParam holds or Msg holds. When to use them and for what? I have also heard about the property LParam and HWnd, when should I use them. In WndProc we have
the code m.Result = (IntPtr)0. What holds the inparameter Message m's property Result and what is IntPtr? I have seen codes like
protected override void WndProc(ref System.Windows.Forms.Message m)
{
switch (m.Msg)
{
case WM_GETTEXT:
string s = ModifyOriginalText(this.Text);
int charsToCopy = Math.Min(m.WParam.ToInt32(),s.Length);
m.LParam = Marshal.StringToHGlobalAuto(s.Substring(0,
charsToCopy));
m.Result = new IntPtr(charsToCopy);
return;
}
base.WndProc(ref m);
}
Here they are using the property LParam and here they make a new IntPtr with another amount on int.
I need an accurate explanation when to use Msg, LParam, WParam, Result and for what.
And when we are calling
base.WndProc (ref m);
we want something to happen or what? I mean in the NumericBox example, when it finds not a number it just returns, but why does it have to add (IntPtr)0 to m.Result before. Could they instead have written new IntPtr(0)?
What does the amount to IntPtr tell us?
I know there are many questions, but I so much want to learn this and understand it thoroughly.
Hope you can help me and explain accurate.
Many thanks
Fia
|
|
|
|
|
The author is using the this to override the default Windows message handling process which is what drives a Windows program. In this case he checks to see if the message is WM_GETTEXT and if so returns his modified text to the calling process. This is not generally required in .NET applications but if you are really interested you can take a look here[^] on MSDN.
|
|
|
|
|
Hi
Thanks for the answer. But it doesn't tell me what the Message's properties Msg, LParam, WParam and Result are for. When to use them and what to do with them. And the question what to assign to m.Result, how do I know what to assign? I have seen so many examples when I have googled, but no explanation. I have seen m.Result = new IntPtr(charsToCopy)and m.Result= (IntPtr)0 or new IntPtr(0), but how do I know what integer to assign m.Result what does it differ.
Many thanks
Fia
|
|
|
|
|
The values of WPARAM , LPARAM and the return are all dependent on the message being processed. For example here[^] are the details for the WM_GETTEXT message.
|
|
|
|