|
I would like to know. Is it only me or your are also spending more time in config files than really writing code with .NET. I really hate this framework because of that.
It's not a framework that is made for developer with a good logical mind that like coding. To master this framework you need memory first and be able to manage the config files first.
For one day of development on my machine I need 3 days to configure everything on the production server. The code always works fine on my machine. I never get such problem with other languages.
|
|
|
|
|
I have no idea what you're spending so much time on or even what config files you're talking about.
I usually work on app/web.config files for about 5 minutes ... per project.
|
|
|
|
|
Sounds interesting. I had never that problem. I'm working on a web application out for 5 years and made no changes to the config file for ages...
It's true that at the beginning I spend about 3 hours to fine tuning everything, but nothing since then...
You better get us into the details so we may spot the problem and help you out...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
It really sounds to me like you're doing it wrong. I spend next to no time in config files when I'm developing.
|
|
|
|
|
B413 wrote: hate this framework Which framework are you talking about?
B413 wrote: I never get such problem with other languages. Which language are you talking about?
|
|
|
|
|
For my web stuff, I spent half a day getting it the way I wanted about four years ago, and then recycle that structure for new projects.
Once of the best things I did was to be aware of the different between production and developnent config files, and allow for it: Supporting Development and Release web.config in ASP.NET[^]
Nowadays, it takes trivial time to support config files: just a minor tweak to DB connections and I'm off most of teh time.
If it's taking your three days, I can't help feeling you are approaching the task wrong...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I usually only set database information in the config file, the rest goes in the database.
I define it as key/value pairs, but also include "category" and/or machine/module information to be able to filter the necessary.
In addition you could add a "user" filter for settings that a user can change.
I also add a description on what the key/value pair is for.
my two cents.
PS: web services/WCF remain a major drag in this...
|
|
|
|
|
dear all!
i'm write an listen connection (connection to Sql server database) application(APP):
if connection is not available (connection cable is unpluged or broken), my APP will sleep, until the connection is available,my APP will wake up and execute SLQ commands. if connection is broken again, my APP continue going to sleep until connection is available...
please explain for me or give me some key word about that problem.
thanks!
Note: i think i need to understand a listen mechanism that similar to mechanism of MessageQueue.Receive() method. but i still don't understand this mechanism
Amateur Programmer
|
|
|
|
|
If I understood your question correctly, why not create a loop which would
- loop while connection is established or other wait end condition is met
- define proper timeout [^]
- try to open[^] the connection
- if not successful, sleep[^] for awhile
If you need, you can monitor the network status changes as in Simple Network Status Monitor Example[^]
|
|
|
|
|
the first, thanks for your answer!
i think if we use while loop, the performance is not very high.
now i am reading Simple Network Status Monitor Example[^].
if you have any about this topic's document. please send to me!
thanks so much!
|
|
|
|
|
My input text is:
"the quick ${var1:a=b,c=d,e=f} brown fox ${var2:g=h,i=j,k=l}"
var1,var2 is a "variable"
a=b is considered a "parameter".
I can have any number of variables in the input string
I can have from 0 to any parameters (i.e. ${var1} is allowed)
My end result is I want to split as:
var1|a|b|c|d|e|f for the first match
var2|g|h|i|j|k|l for the 2nd match
The regex I'm using is:
\${([A-Za-z]+)(: ([A-Za-z]+)=([A-Za-z0-9]+)(,([A-Za-z]+)=([A-Za-z0-9]+))*)*} <=== NO SPACE after the colon (preventing smiley)
Right now I'm getting:
var1|a|b|e|f (and a few other groups I don't care about), but for discussion, the full split is: |var1|:a=b,c=d,e=f|a|b|,e=f|e|f
The problem is, it's grouping a&b and e&f, but its skipping c&d for some reason... if I add a 4th parameter, now it skips e&f too. I.e. it only shows the FIRST and LAST param.
What's going on?
|
|
|
|
|
You may be trying to do too much at once. I'd either make it multiple pass or use code.
One other thing I'll mention, is that often with this sort of thing you need to scan right-to-left.
|
|
|
|
|
|
Hmm... apparently, what I'm seeing is "expected" behavior. Standard regex behavior is to only keep the last group. I think that's insane and apparently so did the .Net folks as they have the only regex engine which keeps all capture groups. Thanks!
|
|
|
|
|
SledgeHammer01 wrote: only keep the last group
When looking at another Regex question today, Regular Expression, specific seq[^] , I learned something new.
A pattern like (aB)* may match multiple times and only the final match will be captured, but you can capture the whole thing too ((aB)*) .
|
|
|
|
|
The .Net regex engine is "special" as it's the only regex engine in the known universe that doesn't throw away intermediate captures. If you look at the Group object that captured the last occurrence of the group in question, there is a Captures property. They give you the intermediate captures in that collection.
(aB)* will match aBaB, but it will only give you 1 aB. If you look in the Captures property, it'll give you the 2 you are after.
((aB)*) will match aBaB, but it will still only give you 1 aB. It will also give you aBaB which is not what you really want.
|
|
|
|
|
SledgeHammer01 wrote: not what you really want
It might be, but I haven't had a need for it yet. :shrug:
|
|
|
|
|
from this job we can get the submitter, and machine, no. of pages and filename. But unable to get the printer for the job(Not Default printer in the machine), No. of copies, paper size and other settings. Need help for this issue.
Thanks in advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
my job is print monitoring i.e. application print manager developing in c#. I catch the print job from printer queue. From that job I can get the print submitter,job name,hosted server,job time, no. of fro print and file name and some other details. but unable to get the printer selected for the print and no of pages,printer paper source, duplex or non duplex and some other details. this my problem.
foreach (var job in LocalPrintServer.GetDefaultPrintQueue().GetPrintJobInfoCollection())
{
UpdateText("Job Name : " + job.JobName.ToString());
UpdateText("Submitter :" + job.Submitter.ToString() + job.TimeJobSubmitted.ToString());
UpdateText("Hosted Server :" + job.HostingPrintServer.Name.ToString());
UpdateText("No of Pages :" + job.NumberOfPages.ToString());
}
I Need help.
please suggest any other way to complete my task.
Thanks in advance.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
Hi all! Im having a problem with datagridview. A MySQL Query, with int32 column my datagridview show as System.Byte[].
Any suggestion?
Thanks!!
|
|
|
|
|
gonzaloleon wrote: with int32 column my datagridview
Is it an Int32 in the table-definition? Or did you mean an Int32-column in the DGV?
What does your query look like? Can you run a "SHOW CREATE TABLE" query on the table and dump the result here?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I'm uncertain what you mean by your question.
Are you saying it is displaying as byte[] and you don't want it to?
Or you want it to display as byte[] and it isn't?
|
|
|
|
|
It's a problem with MySQL Server Version, i upgrade to 5.6 and there's no more problems.
Thanks All!
|
|
|
|
|
I wanted to know wether I could use your Simple Instant Messenger in a windows app and if yes how do I??
|
|
|
|