|
hi guys where can i find punch hole examples in .net or php??
Please help me...I'm coming crazy...
thanks
|
|
|
|
|
There are few prof. that sells out idea how to implement using .net
Are u ready to spend some $ for that?
|
|
|
|
|
suppose input is "zain"
first root will be z and its children will be "a , i , n". then "a" has its children that is "i , n" and "i" has its child that is "n". similarly maintaining the tree by setting root to "a , i , n".
then i am traversing the tree through recursion. i have also check input string " aha" its working. but with long words its throws exp.
|
|
|
|
|
Why are you starting a new thread??
|
|
|
|
|
Because the forums are overrun with people who have no clue ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
No, but honestly, why
Edit: I understand if your question goes unanswered for a couple of days and it was a decent question, but its 6 inches down...
|
|
|
|
|
I had to go back and read his post because I thought he was spawning Thread s for this
Cheers,
Vikram. Current activities:
Films: The classic Pink Panther series
TV series: Friends, season 3
Books: Liar's Poker, by Michael Lewis. Carpe Diem.
|
|
|
|
|
I guess your method of recursion is causing the loop to call itself too many times, OR, longer words expose a bug that causes infinite recursion. So hard to say more without actual code.
It sounds like the number of calls increases exponentially, so option 1 is not off the cards.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
yup its increaing exponentially. thats the code
private void button1_Click(object sender, EventArgs e)
{
listView1.Items.Clear();
lst.Clear();
str.Clear();
dummy = textBox1.Text.ToCharArray() ;
for (int i = 0; i < dummy.Length; i++)
str.Add(dummy[i]);
for (int i = 0; i < str.Count; i++)
{
root = new Node();
first(root);
recursive(root);
addlist(root, null);
char c = str[0];
str.RemoveAt(0);
str.Add(c);
}
lstview(); // adding lst to listview
}
private void addlist(Node current, Node parant)
{
if (current == null)
{
try
{
ch.RemoveAt(ch.Count - 1);
if (parant.NextCousion == null)
{
ch.RemoveAt(ch.Count - 1);
addlist(parant.parant.NextCousion, parant.parant.parant);
}
else
addlist(parant.NextCousion,parant.parant);
}
catch
{
return;
}
return;
}
ch.Add(current.data);
if(current.childerns.Count>0)
addlist(current.childerns[0],current);
if (current.childerns.Count == 0)
{
string s = "";
for (int i = 0; i < ch.Count; i++)
s += ch[i];
if(!lst.Contains(s))
lst.Add(s);
ch.RemoveAt(ch.Count - 1);
}
else
{
try
{
ch.RemoveAt(ch.Count - 1);
}
catch
{
return;
}
addlist(current.NextCousion,current.parant);
}
}
public void recursive(Node current)
{
for (int i = 0; i < str.Count- 1; i++)
layers(current.childerns[i]);
}
public void setingcousion(Node current)
{
int limit = current.childerns.Count;
for (int i = 0; i < limit; i++)
{
if (i == 0)
current.childerns[0].PreCousion = null;
else
{
current.childerns[i].PreCousion = current.childerns[i - 1];
current.childerns[i-1].NextCousion = current.childerns[i];
}
current.childerns[i].parant = current;
}
}
private void layers(Node current)
{
if (current == null)
return;
current.cousions = new List<Node>();
current.childerns = new List<Node>();
for (int i = 0; i < current.parant.childerns.Count ; i++)
{
if (current != current.parant.childerns[i])
{
current.cousions.Add(new Node(current.parant.childerns[i].data));
current.childerns.Add(new Node(current.parant.childerns[i].data));
}
}
for (int i = 0; i < current.childerns.Count; i++)
{
current.childerns[i].parant = current;
current.cousions[i].parant = current.parant;
}
setingcousion(current);
if (current.childerns.Count == 0)
{
layers(current.parant.NextCousion);
return;
}
for (int i = 0; i < current.childerns.Count; i++)
layers(current.childerns[i]);
}
|
|
|
|
|
public void first(Node current)
{
current.parant = null;
current.PreCousion = current.NextCousion = null;
current.childerns = new List<Node>();
current.data = str[0];
for (int i = 1; i < str.Count; i++)
{
if (i == 1)
{
current.childerns.Add(new Node(str[i]));
current.fisrtchild = current.childerns[0];
current.childerns[0].PreCousion = null;
}
else
{
current.childerns.Add(new Node(str[i]));
current.childerns[i - 1].PreCousion = current.childerns[i - 2];
current.childerns[i - 2].NextCousion = current.childerns[i - 1];
}
current.childerns[i - 1].parant = current;
}
}
i know my code is unreadable.
|
|
|
|
|
Hi,
there are 10! / 3! / 3! / 2! = 50400 unique permutations for "statistics".
my 30-line program finds them in 26 milliseconds with a simple recursion, basically without structs, arrays, lists.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
dear sir,
i have developed a software in c#, for reddit.com to automate processes. but i want to use proxy server to connect this site. i have to create one proxy server. but i dont know what is the actually use of proxy server and what is the need and how can i create one proxy server to connect this site.
do u have any idea. please share with me.
Thanks for any suggestion.
yogesh
|
|
|
|
|
yesb.Click += new System.EventHandler(this.Show());
nob.Click += new System.EventHandler(this.Close());
this is the error I keep getting:
An object reference is required for the nonstatic field, method, or property 'System.Windows.Forms.Control.Show()'
Same thing for this.Close() as well.
I have two buttons, one should reload the application, and the other closes it.
|
|
|
|
|
Interesting
Have you tried pressing TAB twice after writing the +=?
Putting the show/close in those methods may be more.. reliable (as in: no chance that it could go wrong)
|
|
|
|
|
No I haven't. I used this.Close() before and it worked fine.
|
|
|
|
|
Of course it does, but I don't think you're putting it in the right place. If you had pressed tab twice, you would get code like DaveyM69 shows you.
|
|
|
|
|
You can't call Show or Close this way unless you overload the methods i.e
yesb.Click += new EventHandler(Show);
void Show(object sender, EventArgs e)
{
Show();
} The normal way is to have a Click event handler and call Show from there - the same really - just a more logical name.
yesb.Click += new EventHandler(yesb_Click);
void yesb_Click(object sender, EventArgs e)
{
Show();
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Thank you! It worked
|
|
|
|
|
when i created a data source i get the following error:
An error occured while creating data source
Could not get type information for 'Example1.Example1.DataSet
It would be gr8fi anybody can help me with this to run the program successfully..
|
|
|
|
|
i m working with recursion and i have got an exception that says stack overflow
any solution?
|
|
|
|
|
It will be hard to identify the problem without code... code you post the code where this is happening?
|
|
|
|
|
hotthoughtguy wrote: any solution
Yes, dont exceed the stack size. Thats about as detailed answer as you can get based on the info provided.
|
|
|
|
|
Does this occur quickly or after a long run time? The former case of stack overflow often occurs due to infinite recursion.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
You got this message because you didn't put anny kind of a bailout condition check into your method that's calling itself.
|
|
|
|
|
its not infinite recursion.its a program that gives you all possible combination of input string such as ABC.
so combination will be ABC ACB BAC BCA CAB CBA. i hv made a general tree n then traversing that tree through recursion. but it throws exception in words grater then length of 7. such as statistics.
|
|
|
|