1) Anything required to build the demo -- you included a demo, right?
2) In the article with explanations? More is better.
3) Generally not very, but it depends on the subject. Please don't include screenshots of Visual Studio.
I try to create a morse code sound with high speed. I referenced some project, and i used this project to reference. But when i used this code, it seems cannot hear the sound. Can anybody help me please?
I've been working on a program to renew Windows profiles on a remote location via Active Directory.
The program retrieves a user profile location(ProfilePath)
once the program verifies the email adres to be valid. The problem with the code provided below is that aside from the test e-mail account i used any other e-mail adres inputted returns the NullReferenceException.
my test account works perfectly and renames the profile to .old. I can't think or see what i did wrong,
Any critisism or suggestions what i could try is welcome.
Thanks in advance.
Found out the problem lies with loggin in with different credentials. I need to extend the right of the logged in over the entire application the loggin works but renaming a folder is not allowed on for the user running the application
privatestring GetProfilePath(string user)
DirectoryEntry dirEntry = CreateDirEntry();
DirectorySearcher dirSearcher = new DirectorySearcher();
dirSearcher.Filter = "mail=" + user;// er wordt hier gefilterd op email adres
dirSearcher.PropertiesToLoad.Add("profilePath");// uit AD wordt het profiel pad gelezen en opgeslagen.
SearchResult sResult = dirSearcher.FindOne();
if (sResult == null)
MessageBox.Show("Niks gevonden", "Niks gevonden", MessageBoxButtons.OK, MessageBoxIcon.Error);
DirectoryEntry dirEntr = new DirectoryEntry(sResult.Path);
string profile = dirEntr.Properties["profilePath"].Value.ToString(); //terug komende nullreference, lokaal geen probleem op server wel
doing so now.
and point taken about comments being in english.
My code is kinda messy at this point but the beep comes when the error box opens
Tested it beep comes when the error box opens but thanks for pointing it out
I want to validate the xml file against certain set of rules in database.I have done most of the this but got stuck in below part. Any pointers will be appreciated.
Following is the sample xml file.
As displayed there are multiple instances of <BACKGROUND><QUES_NUMBER><QUES_RESPONSE></BACKGROUND> tag. Now I have to validate below rule.
Rule 1- If QUES_NUMBER in (1,01,001) Then QUES_RESPONSE should be in (Y,N)
Rule 2- If QUES_RESPONSE Equals (Y) Then one instance of QUES_NUMBER 1A,01A,1B,01B should exist.
Rule 3- If QUES_NUMBER in (1A,01A) Then QUES_RESPONSE (X,Y,Z,Y/Z)
Rule 3.1- If QUES_NUMBER in (1B,01B) Then QUES_RESPONSE (X,Y,Z,Y/Z)
This is the complete Rule. If we are processing rule number 1 and result is true then we have to validate THEN condition (QUES_RESPONSE).
If THEN condition is true then I have to process Rule 2 (as there are multiple instance of same tag) I have to check the QUES_RESPONSE (Y)
of the same tag for which I have validated Rule 1 condition. For that purpose I am passing then index of index of the QUES_NUMBER and it works f9.
PROBLEM occurred in the THEN condition of Rule 2..Where are I am passing the value in xml file and match value (value in database Y,N) and index of the
question number to look at. But the as per then condition 1A..tag should exist and the code will try to locate the tag on that index which he will never
Any pointer where I need to change in logic/any other way will be appreciated.
Below is the function which is validating the value in xml file against db value.
What occurs to me is the possibility of having the rules be XPath expressions. For example, rule 1 could be expressed as something like:
//BACKGROUND/QUES_NUMBER[.='1' or .='01' or .='001']/parent::BACKGROUND/QUES_RESPONSE[.='Y' or .='N']
These expressions could then be stored in the database, probably with something to indicate which order to apply them and a value (e.g. 0 or 1) that would indicate a successful test.
Maybe have a branching scheme -- so you can choose the next rules based on the result of the current one.
For instance, the above expression should return one node -- if 0 fail, if 1 goto rule 2, else fail.
However, it will be very tricky to define the rules exactly right.
this's the error when I run the program "Cross-thread operation not valid: Control 'listBox1' accessed from a thread other than the thread it was created on."
please help me
this's my code, it's simple