|
Hi All,
Question I have a string of Data that I am going to split with the method :
string[] Values = FileData.Split(delimeterCharFurther);
delimeterCharFurther are
char[] delimeterCharFurther = { '<', '>' };
I need to check the string before I split it that all the valid data is surrounded by < and >. I was thinking of a variable
for (int a = 0; a <= FileData.Length; a++)
{
Location = FileData.IndexOf("><");
MessageBox.Show(Location.ToString());
} but if I'm right that will only find the first, one way to do it I'm guessing is to search for a > without a following
|
|
|
|
|
IndexOf is overloaded, therefore location=string.IndexOf(subString, location+1); if often used in a loop for such purposes.
|
|
|
|
|
Hi Glenn,
Not sure what 'valid' means : what about "<a<b>>" ?? you should get "a","b"
If so 'split' is probably not the path to the solution.
But if not (i.e. <a<b>> is invalid )
why not
string[] Values = FileData.Split('<');
first
then check values that are ending with a '>'
Regards
|
|
|
|
|
Thanks for that, I think 'valid' was my typing as thinking the data is (should be) enclosed in < & > but in transmission some times it shows up as Data not (or even D!"" random ASCII) if it does throw 'em away and carry on. My think was along the lines of declare an int pointer increment over the string, then I remembered it was Windows and C#, not DOS & Turbo C!!
Glenn
|
|
|
|
|
Or use a Regular Expression:
@"<(?'Data'[^>]*?>"
|
|
|
|
|
Hellow every body I can't send mesg by asp.net coz this exception accore the operation time out
|
|
|
|
|
A couple of points.
1. Without showing us any code whatsoever, we couldn't even begin to guess where it's going wrong.
2. What do you mean by accore? I appreciate English isn't your first language, but I'm not sure what word that's meant to be.
|
|
|
|
|
Pete O'Hanlon wrote: What do you mean by accore?
I suspect it should be occur.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Firstly, this really belongs in the ASP.NET forum.
Secondly, I think some of the answers to this question[^] may be relevant.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Timeout - most probably a network issue where you are unable to connect to the server.
Make sure your network is up and you are able to connect to the mail server.
|
|
|
|
|
thanks for u Abhinav S the problem is connect to the server
|
|
|
|
|
Hello,
I'm tring go apply blending with transparency, I have a transparent image and another full image.
When I apply Multiple Blending option the transparent side becomes black, is there an option to make them transparent or white?
|
|
|
|
|
OK It's just about using PixelFormat.Format32bppArgb
|
|
|
|
|
Who can help me with an idea (title) for a dissertation (final work to master)? The preferred can be done in C #.
|
|
|
|
|
Your tutor.
We have no idea of your course, your speciality, your interests, your ability - let alone what your college would consider acceptable as a final project.
Talk to your tutor - he or she will be used to this kind of question by now!
(And don't post this everywhere you think it might fit - we do notice reposted questions)
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Picking a dissertation topic is harder than most people realize.
Look at the papers being published in your area. If you can extend any of this work, you have your topic. The best papers/dissertations open up a new area for research OR summarize and solve an existing problem/area that's been around for a while.
Another approach is to take a small subproblem that isn't covered well in existing papers, and solve it completely.
There are pros and cons to picking a well-known topic vs an obscure one. An obscure topic limits the "gotcha!" questions the committee can ask you, and usually has more opportunities to make an original contribution. A well-known topic has instant credibility, and more publishing opportunities, but it can be harder to find an aspect of it no one's looked at yet.
Coming up with a framework for the problem domain gives a dissertation the mathematical rigor committees like to see. Try to choose something that makes use of your strengths.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
|
|
|
|
|
Hi... I tried to search but I think I didnt found the answer thats why Im posting my query here. If some instance theres already post that can answer my question, can you direct me to that path?
Heres my problem:
I create a services and installed it as:
processInstaller.Account = ServiceAccount.LocalSystem;
Upon start it modify and/or delete some registry entry under HKEY_CURRENT_USER. The current account user is an Admin, but still it give me an error message "Could not start the Service on Local Computer. Error 5: Access is denied." upon starting the service at Services and Applications.
Below is my code upon changing registry entry.
string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
RegistrySecurity rs = new RegistrySecurity();
rs.AddAccessRule(new RegistryAccessRule(user,
RegistryRights.ReadKey | RegistryRights.WriteKey,
InheritanceFlags.None, PropagationFlags.None, AccessControlType.Allow));
RegistryKey key;
key = Registry.CurrentUser.OpenSubKey(path, true);
key.SetAccessControl(rs);
.
.(changing of registry here)
.
|
|
|
|
|
jherome wrote: Upon start it modify and/or delete some registry entry under HKEY_CURRENT_USER.
Unless you're doing something specific in your service to get the currently logged in user and impersonate them, the currently logged in user, in your service, will always be LocalSystem, not the currently logged in user at the console. So, HKEY_CURRENT_USER will be for the LocalSystem account.
|
|
|
|
|
Sorry but Im newbie in C#. Can you give me a basic sample how to impersonate the account of currently logged in user?
Actually my code there are from various ideas i collected from net
|
|
|
|
|
First, why are you doing this??
I find it difficult to justify doing anything with HKEY_CURRENT_USER from a service.
Next, it's a huge pain to get a service to impersonate whoever logs in on the machine. You have to register for notifications, create a new token, blah, blah, blah, ... to do WHAT? And since you're copying and pasting code to try to get this to do something, I find it difficult to explain all the concepts involved to someone who doesn't know what's going on.
|
|
|
|
|
Hello,
I am developing a web application about "paintings".
I want to display uploaded images like "paintings on canvas" i tried to generate a cube in WPF and texture it with uploaded image. What i want to do is shown below. I want to ask if do you know any libraries about this or how can i do it. Thanks.
Sample Thumbnail
|
|
|
|
|
If you want to do this as a web application, I wouldn't use WPF. WPF is, primarily, a desktop technology.
|
|
|
|
|
Silverlight perhaps, then? You get a large amount of overlap with WPF. (But I know you know that!)
But then you have to make your visitors install it, so... tough choice to make.
I've seen people do this sort of thing with Flash, too.
|
|
|
|