|
Member 456249 wrote: I dont want to repeat words in the same depth in the tree, but realise they will be repeated at a later depth in the tree.
How about a treeview? I'm suggesting a visual component, because it might help in debugging, and it seems like the data would fit nicely.
I are Troll
|
|
|
|
|
I did have a bit of a fiddle with treeview, I suppose I could serialize it and write and read it back and forth as needed. I guess i was looking at it as more a visual thing, rather than a practical storage method? It might be interesting to visualise it that way now that I think about it. I might give that a shot. Thanks for that. Sometimes I miss the obvious and spend time on the obscure
|
|
|
|
|
Proffessor Lidenbrock wrote: I guess i was looking at it as more a visual thing, rather than a practical storage method?
That's how it's intended, yes. Alternatively, you could create your own tree-structure, kinda like this;
class MyWordNode
{
MyWordNode parent;
List<MyWordNode> children;
}
Start of with a rootnode (one with null as a parent). If you want to add a child to that node, add it to the list of children. That new node will also have it's own list of children, giving you a tree.
Abusing a treeview will save the time of writing your own tree
I are Troll
|
|
|
|
|
Hehe thanks, i like that, abusing treeview
Well since your first post I have made some progress. I have a tree that I can click and add and remove nodes. I have a loaded up the word list and have read into a normal listview the text file, making one sentence one item, removing all punctuation and non char entries.
Just tried to impliment a search threough the nodes of the treeview but crashed and burned on the first attempt. It is nearly 1 am. will try again tommorow. Thanks heaps.
|
|
|
|
|
Cool - you're welcome
|
|
|
|
|
How do you handle:
The boy threw the ball.
The boy threw the ball and the dog fetched it.
This seems to be similar to the spell check tree[^] that I had to write in college.
|
|
|
|
|
Just had a look at that then, a Patricia tree??? Not sure what to think of that one?
|
|
|
|
|
hi
i standing in any position, i need to know if i'am in radius of 10 m from 32.226743,34.747009 position
how to do it ?
(i work on C# windows-mobile)
thank's in advance
|
|
|
|
|
You want to know what classes to use or how to calculate it?
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
|
Hi,
You can use google API to find out the lattitude ,longitude of user current position. Then use the mathimatical formula to find out the distance.
Thanks
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
|
DONE-Problem Resolved
Hi all,
I am createing msi package of my application. If the msi package already install on the system then automatically it should uninstall the previous version and install the new version.
Can anybody help me how can i do this?
Regards
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Monday, July 26, 2010 4:50 AM
|
|
|
|
|
right Click on the setup project and click uninstall
|
|
|
|
|
Hi,
Is it possible to integrate LightBox popup in Windows Application.
Thanx
krishna
|
|
|
|
|
if you're working from a webpage I would integrate a webcontrol into the winapp.
If you're working from winforms, first idea that comes to mind is working with 2 panels. 1 semi transparent that will partially hide the application, the second with the contents you need. You can hide/unhide when necessary. (For reusability, make a User Control)
hope this helps.
V.
|
|
|
|
|
Hi,
Do u have any web links that i can refer ???
krishna
|
|
|
|
|
|
Hi,
We are having a web application which is quite big and used by around 300 super users for managing around 5000 staffs.
Now we are implementing SMS functionality into the application which means the users will be able to send and recieve sms. Every two minute the sms server of the third party is pinged to check whether there are any new messages. Also sms are hold in queue and send every time interval of 15 to 30 minutes.
I want this checking and sending process to run in the background of the application all the time, even if the user closes the browser window.
I need some advice on how do i do this ?
Will using thread will achieve this or do I need to create a windows service for it or are there any other options ?
Regards
Vinay
|
|
|
|
|
I guess you use some DB to store this SMS info, then Windows Service will do the job.
|
|
|
|
|
i have a text box which has set visible false
i want as when as i click on check box then that text field should be enable without post-back (or reload page)
how is that possible please help me..
|
|
|
|
|
look into clients side script like javascript or vbscript.
V.
|
|
|
|
|
ok
if i am using update panel and set check box auto post back true still check box is not working
how it will work??
asp code
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<td align="left" colspan="4"><asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True"
oncheckedchanged="CheckBox1_CheckedChanged1" />
<br />
<asp:TextBox ID="TextBox1" runat="server" visible ="false"></asp:TextBox>
<br />
</ContentTemplate>
</asp:UpdatePanel>
server side
protected void CheckBox1_CheckedChanged1(object sender, EventArgs e)
{
if (CheckBox1.Checked==true)
{
TextBox1.Visible = true;
}
if (CheckBox1.Checked==false)
{
TextBox1.Visible = false;
}
}
}
|
|
|
|
|
As I said, use client side script.
set AutoPostBack to false and attach a clientside handler for the checkbox.
In fact, if you don't need to run on the server, entirely remove the server checkbox (runat server) and add an html checkbox.
Help on HTML[^]
Help with javascript[^]
V.
|
|
|
|
|
In a Windows (C#) form, I need to check if the user has the required permissions to write and delete from a directory (that they select).
I have some code that will do the job, but it feels wrong.
I try writing and deleting a test file and if an exception is thrown, then the test fails.
I am a bit unhappy with using exception testing like this, but can't find any other method that does not require reams of code.
Does anyone have another method that does not require exception testing?
Here is my code.
WriteToLog(string Message, Enum LogType) is a general logging method that writes the first parameter to the log file identified by the second parameter.
private bool UserCanWrite()
{
try
{
WriteToLog("Test", LogFiles.Test);
string TestLogPath = "Failed.Log";
if (BaseDirectory.Length == 0)
{
TestLogPath = string.Format("C:\\{0}", TestLogPath);
}
else
{
TestLogPath = string.Format("{0}\\{1}", BaseDirectory, TestLogPath);
}
FileInfo TestLog = new FileInfo(TestLogPath);
TestLog.Delete();
return true;
}
catch
{
MessageBox.Show("You Don't have Read, Write and Delete privileges on the selected Base Directory\n\nPlease have your System Administrator grant those privileges before proceeding", "Higher Level of Privileges Needed", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return false;
}
|
|
|
|