|
No they match exactly the right amount.. just not at the right place.
|
|
|
|
|
He has the $ at the end -- think of the money shot.
|
|
|
|
|
Strangely, he also has [modified] at the end. Weird.
Somebody in an online forum wrote: INTJs never really joke. They make a point. The joke is just a gift wrapper.
|
|
|
|
|
I can see you've got lots of solutions for the "trimming the string" task, but what I am curious about is:
Once you have the final string, how are you going to cast/transmute that into a usable reference to the current running application's settings: in your own words: "access the application user settings at runtime without having the developer do anything" ?
If you are the creator of the Application, isn't it possible for you, in the app initialization code to set a reference to the App's settings, to use later ?
best, Bill
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
I won't bore you with the full details of why I'm trying to do this because that'll be a long winded explanation . To summarize it in one sentence: I'm writing an application framework library and I currently instruct users to "copy these 4 lines into your startup code and modify the namespace to handle this specific scenario".
The code they copy is basically 4 lines that look something like:
WpfApplication3.Properties.Settings.Default...
I'd like to update my framework so they no longer have to do that. I already have an 'ApplicationEx' class that they derive from.
So, what I do is, in the ApplicationEx constructor, I do:
string type = this.GetType().ToString(); // this is going to give me something like "WpfApplication3.App"
I then take "WpfApplication3.App" and use the string manipulation stuff above to get the string "WpfApplication3.Properties.Settings".
I then do:
Type t = Type.GetType("WpfApplication3.Properties.Settings"); // Type.GetType is a static method in the Type class
that gives me the type of the settings class. The settings class (as generated in VS) has a static public property called Default that returns the instance, so I simply use reflection to get the PropertyInfo of that property and invoke the getter and viola... I've got an ApplicationSettingsBase reference to the settings class .
|
|
|
|
|
+5 Enjoyed the explanation, and that's clever code
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
Hi,
I have tried to deploy my web application (VS2010 + C#) by adding the project output and building a msi setup. But, I want to do these steps through command prompt. Our command scripts will do all the stpes to deploy in server.
That command prompt scripts should do the following things
1. Getting latest version of my solution
2. Adding web deployment project and adding project outputs there
3. Building and deploying in a server..
How to do these things thorugh command prompt only?
Thanks in advance.
Balasubramanian K.
|
|
|
|
|
If you are speaking of using a console window with command prompts to do an update and/or installation with all the complexity you describe to a server: how many years do you have to finish this project ?
If you don't have years, maybe check out ClickOnce, via search here on CP.
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
Maybe learn to use MSbuild? I dunno.
|
|
|
|
|
BalasubramanianK wrote: 1. Getting latest version of my solution
That depends on the type of source-control that you're using. I described the steps to download source from sourcesafe here[^], as part of a daily build script. There are similar options for other source-control systems like tortoise and SVN. Simply google the productname and "get source commandline".
BalasubramanianK wrote: 2. Adding web deployment project and adding project outputs there
You don't point the project output there, you COPY the resulting assemblies. Don't mess around with settings if you don't have to.
BalasubramanianK wrote: 3. Building and deploying in a server..
You can generally deploy using XCOPY , using REGASM for assemblies and REGSVR32 for COM-server that need be registered. Building can be done using the IDE and some commmand-line options, but it would be recommendable to use MSBuild[^], as suggested by PIEBald.
Bastard Programmer from Hell
|
|
|
|
|
Any freeware sdk is available for accessing the twain based scanners and save the images as multipage pdf or tiff.
modified 16-Dec-11 1:15am.
|
|
|
|
|
Have you tried a Google search?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
In general, or for this question in specific? If the latter, I suspect we all know the answer.
|
|
|
|
|
Both I guess; I just wonder why people think it faster to post a Google search into CP rather than the obvious place. Ho-hum.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Because it's easier to get us to do their thinking for them.
|
|
|
|
|
It was a rhetorical comment.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
But it deserved an answer.
|
|
|
|
|
Pete O'Hanlon wrote: But it deserved an answer. But, speaking rhetorically: is the answer it deserved ... deservedly ... rhetorical; or, would a rhetorical answer be just desserts ?
When I consider the brief span of my life, swallowed up in the eternity before and after, the little space which I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which knows me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then. Blaise Pascal
|
|
|
|
|
Hi there!
I need some help please; I am trying to parse an excel file and it is parsing all rows just fine except for the row that is set as currency format. This row is returning a null. Can somebody help please.
Thanks
Sameer
|
|
|
|
|
|
How are you trying to parse it? If you are reading direct from the Excel cell then chances are the content is simply a binary number.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I'm pulling in a sql table via linq to sql called "Employee".
There are a total of 11 fields within this Employee table, so my LINQ automatically creates properties such as the following:
Employee.Name
Employee.Address
Employee.Phone
etc...
I now however, need to add a child property to each of these properties called "Location", but I'm not sure how I would do this. So for example, I would need to use code such as the following:
Employee.Name.Location = 1;
Employee.Address.Location = 2;
Employee.Phone.Location = 3;
etc...
I know I could set this "Location" up directly within my linq to sql dbml file, however anytime I update my database, my dbml file would be overwritten, so I'd prefer to avoid that.
Is there any other way I can setup this "Location" child property?
Thanks.
|
|
|
|
|
Okay I just went cross eyed trying to relate Linq to database design. I'm sorry but I need to go back to the fundamental of the underlying data structure.
Create the following tables
Person
Locations/Addresses(these are probably the same thing as a Location will only have 1 address presumably.
PhoneNumbers has a foreign key PersonID
lnkPersonLocation - allows many to many links between location and person with a FK to both tables
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have an abstract base class and two derived classes:- MyBase , MyFoo : MyBase , MyBar : MyBase .
I am creating readonly (and immutable) collections of MyFoo and MyBar :- MyFooCollection , MyBarCollection .
These are created by a one shot only factory method, so once instanciated the collection's contents will not change.
I would also like to provide, for convenience, a collection of MyBase :- MyBaseCollection which is a collation of all items in the other collections.
What would be your preferred method?
A. Create a MyBaseCollection on the fly each time it requested from the existing two collections.
B. Cache a MyBaseCollection and even though it is a duplication of the existing two collections.
C. Cache only a MyBaseCollection and create the other two collections on the fly from it.
D. Something else...
|
|
|
|
|
What do you need to do with it?
If you're only going to iterate over it (foreach), then I suggest a simple iterator that iterates one then the other -- the caller could cache the results if needed.
|
|
|
|