|
i use this code to represente xml document oon treeViewer
but the attributes don't apprae in treeViewer
can you help me
<br />
try<br />
{<br />
XmlDocument dom = new XmlDocument();<br />
dom.Load(textBox1.Text);<br />
<br />
treeView1.Nodes.Clear();<br />
treeView1.Nodes.Add(new TreeNode(dom.DocumentElement.Name));<br />
TreeNode tNode = new TreeNode();<br />
tNode = treeView1.Nodes[ 0 ];<br />
<br />
AddNode(dom.DocumentElement, tNode);<br />
treeView1.ExpandAll();<br />
}<br />
catch(XmlException xmlEx)<br />
{<br />
MessageBox.Show(xmlEx.Message);<br />
}<br />
catch(Exception ex)<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
<br />
<br />
<br />
<br />
private void AddNode(XmlNode inXmlNode, TreeNode inTreeNode)<br />
{<br />
XmlNode xNode;<br />
TreeNode tNode;<br />
XmlNodeList nodeList;<br />
int i;<br />
<br />
if (inXmlNode.HasChildNodes)<br />
{<br />
nodeList = inXmlNode.ChildNodes;<br />
for(i = 0; i<=nodeList.Count - 1; i++)<br />
{<br />
xNode = inXmlNode.ChildNodes[ i ];<br />
inTreeNode.Nodes.Add(new TreeNode(xNode.Name));<br />
tNode = inTreeNode.Nodes[ i ];<br />
AddNode(xNode, tNode);<br />
}<br />
}<br />
else<br />
{<br />
inTreeNode.Text = (inXmlNode.OuterXml).Trim();<br />
}<br />
}<br />
<br />
|
|
|
|
|
Add a section that processes attributes similar to the processing of child nodes. Something like...
<code>
if (inXmlNode.Attributes != null)
{
foreach (XmlAttribute attribute in inXmlNode.Attributes)
{
inTreeNode.Nodes.Add(new TreeNode(attribute.Name));
}
}
</code>
if (inXmlNode.HasChildNodes)
|
|
|
|
|
i am biginer in c#
i don't know whre place the code that you give me
he^ple me please
|
|
|
|
|
How to Change the IP Address of the Local Machine Using C#.
|
|
|
|
|
1) Your subject is useless. "Help Me!" does not in any way give an indication of your question.... the whole reason to have a subject line in the first place
2) Your question is useless. It does not in any way provide enough information, nor does it provide a question that can be answered in a forum environment. There should be a link in the forum for "How to get answers to your question", you would do well to read it.
3) A google search with the EXACT text you just typed into the message body actually returns a number of useful links. For a broad question such as yours google is 100x better to look on than a forum.
Try it sometime[^]
|
|
|
|
|
Hello folks.
I see That Win32 Has alof of methods that could be useful but my problem in win32 is not to find the specific method but the problem is , How can i know the value of the constants variables and how can i determine them ?.
Cause these constants are written in Hex like 0x140 For example . i need to know how can i determine these constants in any upcoming problems in the future ?
Thanks folks
Any help will be greatly appreciated.
Mess With The Best And Die Like The Rest
|
|
|
|
|
If you're lucky they're listed on pinvoke.com. If not, they're defined in the same win32 .h file as the api itself. You can also look on msdn.com
|
|
|
|
|
hi!
can anyone plz tell me how to implement a client that does http basic authentication via web services.
the service is in java. and the client which is a destop app. in C#.
the service is supporting basic authentication....
but SoapHttpClientProtocol or WSE 3.0's WebServicesClientProtocol is unable to do it via Credentials propterty... i have tried ICredentils, NetworkCredentials and CredentialsCache but its not working. i have also set the PreAuthenticate = true.
thanx
-- modified at 0:22 Thursday 16th February, 2006
|
|
|
|
|
Hello to all,
I have to develope an RTP streaming in C#.Net. By googling i found a some description of namespace "MSR.LST.Net.Rtp".But i dont know from where can i download this dll?
Thanks.
Regards,
Divyang Mithaiwala
|
|
|
|
|
|
the link is now invalid.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
...and?
Look at the date of the post. It's over 8 YEARS OLD!
Don't reply to posts that are older than a few months.
|
|
|
|
|
any idea how to extract car plate number from jpeg image??
i trying to write this code but i need some assistance.....
mind to share with me...a source code would be nice....
|
|
|
|
|
Well, most car plates are done in a standard font
If you could create an array of images / vectors showing the framework for each possible character
(ie the skeleton of an F would be just the basic lines), and then had it search for this shape within each letter in the license plate.
What you have to allow for are lighting, the angle at which the photo was taken, possible different sizes, speeds of car etc.
Looking for a framework will allow you a pretty accurate measurement, and you can make countermeasures against specific problems (ie images on license plates etc)
Regards
James
|
|
|
|
|
|
thats great guyys...thx a lot
for the character recognition, i got think about neural network...i know its the best solution but its hard to write for me knowing that my programming level is not that good..
any suggestion of other ways to do it??
|
|
|
|
|
I've programmed a simple neural network in some hardware before and I've simulated it in C++ too. You only need to first demystify the neural network by realizing it's just standard matrix algebra then figure out how to apply the neural network to the problem.
I figure you'd have to create an image for each character on a place, feed each into the network so the network "learns" all the images, then scan the plate and pick out each letter. It's best to convert your pictures to black and white because the neural network works best when there's ample contrast. If you can't convert the pictures, then you'll have to increase the qualify of the network by adding new nodes.
If you demystify and understand a neural network, the short paragraph above makes much more sense. Good luck. I know two groups of people that used a neural network to correctly identify someone by their voice and by their faces over 99% of the time.
|
|
|
|
|
In response to the latest reply:
Im not too familiar with neural networks, but from what ive heard, am I right in thinking its similar to reverse-engineering matrices in DirectX to find what object a mouse clicked in a 3D world?
if you are trying to simulate a speed camera (i.e. a stationary object) then you may not need this as you can use the same algorithm as the cars will always be taken in the same position (roughly), and you can search the whole scene for a license plate (look for yellow etc) and then scan that area for something which has the skeleton of an "A" and so on.
ie, if you get any font on MS word, (well most sensible ones) you can always fit a skeleton into each letter - they should be one pixel thick, and fit into them.
If you understand that, well done, if not its my explanatory skills lol - jamespraveen@aol.com MSN - that way I can explain in real time which may not be as bad.
James
(dont tell ANYONE im on AOL)
|
|
|
|
|
I don't know about DirectX but I figure in DirectX that it simply converts a click and extends a vector basically perpendicular into the screen and the first surface it touches is the selected entity. If that's so, then I'm pretty sure it's not a neural network.
You can use Windows fonts I guess but if you're reading license plate letters, you really should teach the network using license plate letters, otherwise your network might think 5's are S's and vice versa if a license plate S or 5 looks like Ariel's 5 or S, respectively. You want to "teach" the network with the best materials to minimize error when it goes to work. That's why I said objects that yield the highest contrast give the best weights to the network and do really well. Weights by the way are individual numbers on how likely any particular node is "on".
For instance, if you fed in all the license plate letters and every character occupies a particular pixel, the node that corresponds to that pixel will probably have a weight of 1, meaning that pixel will always be used. When you to go set the network to operate and you give it a picture where that pixel is not used, then the progression of the network will rule out all of it's learned possiblities and result in telling the user that it doesn't know what that image is which is what is supposed to happen.
|
|
|
|
|
ermm...LighthouseJ..is it possible to do this character recognition without using neural network?..bcos i really dont have any base about neural network
and for the starting...i might start with edge detecting to detect the edge bcos car plate normally comes in standard size..rite?
do you have any example about character recognition??
it might help me a lot...and anyone out there if you all have anything to share with me just send to my e-mail
jian_loong520@yahoo.com
or just add me in my MSN...., mave_loong@hotmail.com
thx a lot...
|
|
|
|
|
I can't think of any other mechanism that would do the trick. I don't have any of my old programs but there are several articles on here that feature neural networks in different ways and a google search for neural network yielded many pages on it. I'm sorry I can't help you further but I haven't used a neural network in a long time.
|
|
|
|
|
|
Who knows, how to logoff an USB-Stick from WindowsXP by C#?
My application detects putting USB-Stick by comparsion of the logical drives (Directory.GetLogicalDrives();). It would be nice, to forbid the windows pluggin-process to install special stick-software. Only the stick should be installed. But this is not my problem. My problem beginns, when the stick has to be pulled. My application closes all the files, which should be written on the stick, but at some USB-sticks these files seem to be after that still in memory. Pulling these special sticks causes dataloss. How can I throw out usb-stick by my application?
When my application is running, the monitor is completely filled by my application. So it is not possible, to use the "disconnect hardware surely" button in the taskbar.
Thanks in advance!
|
|
|
|
|
Make use of CM_Request_Device_Eject API ... I do NOT have the code in C#, so I am posting what I do have in C++ ...
Hopefully you can gain enough information from this to create your C# code.
//// this sample demostrates how to safely remove a hardware using
// CM_Request_Device_Eject API.
//
// You need install Windows DDK to build this sample.
//
// http://www.microsoft.com/whdc/ddk/
//
// Specifically the following two header files are needed:
//
// \WINDDK\inc\ddk\wxp\cfg.h
// \WINDDK\inc\ddk\wxp\cfgmgr32.h
//
// Copy the two files to the currently directory and then
//
// cl remove.cpp /I. /link setupapi.lib
//
#include <windows.h>
#include <stdio.h>
#include <setupapi.h>
#include <cfgmgr32.h>
void EjectDevice(DEVINST devinst)
{
CM_Request_Device_Eject(devinst, NULL, NULL, 0, 0);
}
void main()
{
HDEVINFO hdevinfo;
hdevinfo = SetupDiGetClassDevs(NULL, NULL, NULL,
DIGCF_PRESENT | DIGCF_ALLCLASSES | DIGCF_PROFILE);
SP_DEVINFO_DATA devinfo_data;
devinfo_data.cbSize = sizeof(SP_DEVINFO_DATA);
for(int i = 0; SetupDiEnumDeviceInfo(hdevinfo, i, &devinfo_data); i++)
{
DWORD Capabilities;
SetupDiGetDeviceRegistryProperty(hdevinfo, &devinfo_data,
SPDRP_CAPABILITIES,
NULL, (PBYTE)&Capabilities, sizeof(Capabilities), NULL);
if( !(Capabilities & CM_DEVCAP_REMOVABLE) ||
(Capabilities & CM_DEVCAP_SURPRISEREMOVALOK) )
{
continue;
}
DEVINST devinst = devinfo_data.DevInst;
const int size = 300;
BYTE buffer[size];
DWORD requiredSize;
SetupDiGetDeviceRegistryProperty(hdevinfo, &devinfo_data,
SPDRP_DEVICEDESC,
NULL, buffer, size, NULL);
printf("%8d %s\n", devinst, buffer);
// Add code to display UI for user to select a device to remove,
and then:
//
// EjectDevice(devinst);
}
SetupDiDestroyDeviceInfoList(hdevinfo);
}
:..::. Douglas H. Troy ::..
Bad Astronomy |Development Blogging|Viksoe.dk's Site
|
|
|
|
|
Hi All,
I am a AutoCAD user and newly joined this world of programming by learning C# to some extent. (no prior knowledge of any other programming languages i.e, C++/java/cobal nothing)
I want to learn ARX which is supported by Autodesk Applications could some one help me in getting some tutorials for the same. Pleae note that I do not have any knowledge of C++ I want to learn straight from .NET environment.
Any help in this regard is greatly appreciated.
Thanks in advance.
Rukmaj Chandavar
|
|
|
|