|
Hi Leppie,
First of all thks for the reply. What I did try ( I know this is not a good thing to do ) is make the asp.net user account an administrator. That didn't work.
How do you give execute rights to the asp_net user ? Is this the same thing I did. If so it doesn't work.
From my Web Service I can call OTHER console programs just fine. Its just this one that I can't call. Also, I can only seem to run it from an application or in the console. Is there any way I can impersonate or somehow make the console program think that its being run from the desktop ? Is this possible in Web.config or some other way ?
I've been stuck on this problem for 2 days now .. I can't seem to get it running ..
Do you have any ideas ?
|
|
|
|
|
What is the expression to split the following string on the comma with the exception of within quotes?
BT2921893081,071200000006,"Duck, Donald",539485988
Result:
BT2921893081
071200000006
WENTHOLD, HEATHER
539485988
Thanks!
ed
Regulation is the substitution of error for chance.
|
|
|
|
|
Hi,
use the System.Text.RegularExpression-Namespace
string reg = "^(<group1>.*?),(<group2>.*?),\"(<group3>.*?)\",(<group4>.*?)";
Match m = Regex.Match("BT2921893081,071200000006,\"Duck, Donald\",539485988", reg);
U can now find all matches in "m". i.e. m.Groups["group1"]
Hope it works, i have not tested any piece of the code snipped.
Greating, Jan
|
|
|
|
|
Thanks but I think I need to provide a little more detail. I have several files that will have information in different groupings. But they are all comma delimited with quoted strings in one or more positions. So the expression should split on comma's but not those within quotes.
I just bought a regex book last week but left it at home! Great timing!!
Thanks again!
ed
Regulation is the substitution of error for chance.
|
|
|
|
|
The simple answer to this question is to use a delimiter you know won't be used within quoted strings when you generate your file in the first place. If that won't work then make sure that all of your fields are surrounded by quotes and use "," as your delimiter. Beyond that, what you want is possible, but it doesn't have a simple solution. You could go through and extract each quoted field first removing the field as you go, and then capture what's left. Or, you could create a regular expression and use it as a template. It seems to me that the data for each row should be the same basic pattern with each, but you corrent me if I'm wrong. For instance, if your record looks like this:
BT2921893081,071200000006,"Duck, Donald",539485988
Then your next record probably has the same patter but with different values such as:
BT2677793081,071200444006,"Mouse, Mickey",539488888
In that case a regular expresion like this:
/([^,]+),([^,]+),\"([^\"]+)\",(.+)/
shoudl work. I'm not sure how well you know regex. I am most familiar with a perl regex, but I think that perl regexes is what C#'s were based on. Once you run your string through this expression, you should have the items in your capture variables 1-4. Does that makes sense?
Hope this helps. Good luck.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Ok!
So Im into a c# programs that involes multiple forms.
Ya know guys, in VB, we'd just do this
Unload form1
form2.show
And that was it.. p
Well that ain'T working so telle me, how do we switch from
one form to another in C#, like in the example above!!!???
Thanks,
Orlanda
|
|
|
|
|
Well, you have to be a little more specific on what you're trying to do. Do you want to show a 2nd Form from the Form currently displayed? If you have a Windows Forms application then you gotta be carefull, because you will have the Applications MessageLoop attached to (most probably) your main Application Form. You can put the MessageLoop onto a different Form using the ApplicationContext class and its MainWindow (I think) Property.
If you provide us with a little more info we might be able to help better.
Matthias
You'll never master any language, except maybe VB, because there's nothing to it. (Lounge/Christian Graus)
www.mattbart.org Sonork ID: 100.32002
|
|
|
|
|
Hi!
Thanks for the reply.
Ok I'll be specific.
I need to open up seemlessly Form_2 exactly where was Form_1.
That probably means Unloading Form_1. The user press a buton,
and Form_2 opens up (with Form_1 flushed out of the way).
Thanks!
Orlanda
Coding is a family business
|
|
|
|
|
Well, what is your application main form? What form do you use in Application.Run()? Or don't you use a MessageLoop? It's still not clear to me what you are actually trying to do.
Key question is: Do you need to open Form_2 from Form_1? Or can you just do something like this:
Form Form_1 = new Form();<br />
Form Form_2 = new Form();<br />
<br />
Form_1.ShowDialog();<br />
Form_2.ShowDialog();
When the first dialog gets dismissed, the second one is shown.
hth
You'll never master any language, except maybe VB, because there's nothing to it. (Lounge/Christian Graus)
www.mattbart.org Sonork ID: 100.32002
|
|
|
|
|
Hello,
I have been developing a .NET Desktop Application for the past few months. I send copies to my client to check out every so often. Now, I post up an MSI and they have to go download it and install it every time. Does anybody know of a framework or something that would allow me to automatically check for new updates and download them. I look at the APPUpdater provided on GotDotNet but that doesn't really work too well. I may need to download TXT files or database files as opposed to just DLLs.
Any ideas?
Jonathan
|
|
|
|
|
There's an example in MSDN Magazine this month (certainly on the MSDN website) about using the BITS (Background Intelligent Transfer I believe) API included within Windows 2000/XP. It provides it within the context of an application updater and seems extremely simple.
I'd recommend just building it yourself, if you only need simple functionality (i.e. download and replace existing files) then it can't be too difficult.
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
It is interesting that you post that. I found a link to InstallSite.org earlier today which had links to two articles. The MSDN BITS article and one on DevX. Since I had a requirement for Win98 the BITS didn't work. The DevX article looked pretty cool. It just downloads the files based off of an XML file. I have been setting it up this evening. It seems to work well. Some of the files are date-based hence my question in the lounge.
DevX Article - It is in VB.NET but it works well anyway.
|
|
|
|
|
How can i get the icons desktop position.
thanks
|
|
|
|
|
I'm working on a form editor a.k.a like in Visual Studio and sharpdevelop. I save the forms out as xml mainly using to the .ToString methods and then try to convert them back on load.
I thought this would be the way to do it:-
Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name)<br />
If Not PInfo Is Nothing Then<br />
Dim t As Type = PInfo.GetType()<br />
PInfo.SetValue(ctrl, (CType(Nde.Value, PInfo.GetType())), Nothing)<br />
End If
but CType and DirectCast do not accept PInfo.GetType() . They demand a hand coded type e.g. CType(Value, Integer) . Does anybody know of a way to do this?
I look for the TagName via reflection :- Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name) and it returns fine, so it's found the property. But how do I then convert the value to the correct Type so I can set the property value?
Demo XML:
<code><VISIBLE>True</VISIBLE>
<Text>Caption :</Text>
<TextAlign>1</TextAlign></code>
|
|
|
|
|
which bit of "C# discussion board" did you not understand?
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
You lot know more about 'advanced' stuff. I always pick your lots brains. But I just realised that you don't have to explicitly cast you lucky sods
|
|
|
|
|
actually in c# you do have, a great example
float r, x, y;
x = 10f;
y = 2f;
r = (float)Math.Pow(x, y);
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Have a look at Convert.ChangeType .
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
I have tried to convert a C# project into an UML diagram by using the reverse engineer function provided by the Visual Studio .NET, i.e. by selecting the function in the Project -> Visio UML -> Reverse Engineer. However, it does not generate any diagram. Instead of it, it has generated a static model which contains the class properties used in the project, but I still need to drag and drop the static model to the sheet in order to create the UML diagram.
Is there any method that it can automatically generate an UML diagram from a C# project without any drag and drop action?
If anyone would help me about this problem, I would be appreciate it very much.
Best regards,
|
|
|
|
|
don't think so, it reverses engineers the model - its up to you how you want to draw it.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
I see. Thank you for your help.
Sincerely,
Frankie Leung.
|
|
|
|
|
Does anyone know where can I get source code for median filter in C
Thanks
|
|
|
|
|
What are you filtering ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
I am doing scanning of pixels and replace the middle pixels with the median of all its value.
Doing filtering of noise in image like bitmap or JPEG etc.
|
|
|
|
|
My series of image processing articles in C# on this site includes a noise filter, if I remember correctly.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|