|
|
hello
I want to create a code snippet that generate to me the following
//Elie begin : date 12/12/2008 : Fixing ......
//Elie end
i can't generate the date automatically. Plz any help
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
ellllllllie wrote: I want to create a code snippet that generate to me the following
//Elie begin : date 12/12/2008 : Fixing ......
//Elie end
Do not. Since you are using source control (of course you are, right?) this kind of comment is not needed. What is 100000000x more useful in case of nontrivial fixes is detail explanation what you fixed and how, or perhaps bug ID to your bug tracking system if you are using any (and detailed info is there).
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
|
I would probably use a macro instead. Put it on a hotkey for convenience.
I wrote one to put a review comment for when I go through files and do a
preliminary review.
Sub ChangeLastReviewDate()
DTE.ExecuteCommand("Edit.Find")
DTE.Find.FindWhat = "Last Review:"
DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
DTE.Find.MatchCase = False
DTE.Find.MatchWholeWord = False
DTE.Find.Backwards = False
DTE.Find.MatchInHiddenText = True
DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral
DTE.Find.Action = vsFindAction.vsFindActionReplace
DTE.Find.Execute()
DTE.Windows.Item(Constants.vsWindowKindFindReplace).Close()
DTE.ActiveDocument.Selection.EndOfLine(True)
DTE.ActiveDocument.Selection.Text = "Last Review:" & Now() & " [Done by: SRP]"
End Sub
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Hi,
My situation is that i have one checkBox and datagrid. I want to do that: if i check checkBox
the datagrid shows only rows with value 0 in spacific colum.
Can enyone tell me how to do this?
thanks M
|
|
|
|
|
Metik wrote: Can enyone tell me how to do this?
I guess you'll have to add a handler for the check-box event of your interest and write the code to redraw your datagrid to display the columns of your interest there.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
1.Create an IceCreamConeException class whose constructor receives a string that consists of an ice cream flavor and number of scoops.
2. Create an IceCreamCone class with two fields:
• IceCreamFlavor
• Scoops
3. The IceCreamCone constructor calls two data-entry methods:
• GetFlavor(), which throws an IceCreamConeException if the flavor isn’t one of the following: vanilla, chocolate, strawberry, peach, or banana.
• GetScoops(), which throws an IceCreamConeException when the scoop quantity exceeds 3.
4. Create a program that establishes several IceCreamCone objects and handles any throw IceCreamConeExceptions.
5. Save your program.
6. Now “build” your program
Can sumone plz help me with this..its urgent....
hey
|
|
|
|
|
shaheen13 wrote: Can sumone plz help me with this..its urgent....
No, it homework. Go do it yourself!
|
|
|
|
|
shaheen13 wrote: 1.Create an IceCreamConeException class whose constructor receives a string that consists of an ice cream flavor and number of scoops.
2. Create an IceCreamCone class with two fields:
• IceCreamFlavor
• Scoops
3. The IceCreamCone constructor calls two data-entry methods:
• GetFlavor(), which throws an IceCreamConeException if the flavor isn’t one of the following: vanilla, chocolate, strawberry, peach, or banana.
• GetScoops(), which throws an IceCreamConeException when the scoop quantity exceeds 3.
4. Create a program that establishes several IceCreamCone objects and handles any throw IceCreamConeExceptions.
5. Save your program.
6. Now “build” your program
Can sumone plz help me with this..its urgent....
Not sure about the rest of it, but Ctrl+S will help with step 5 and Ctrl+B should get you past step 6.
Good luck with the others. Be sure to post back with the grade you get!
Knowledge is hereditary, it will find its way up or down.
Luc Pattyn
and since what every time when i want to add button to this control one add two times
posted in C# forum
|
|
|
|
|
Malcolm Smart wrote: 1.Create an IceCreamConeException class whose constructor receives a string that consists of an ice cream flavor and number of scoops.
2. Create an IceCreamCone class with two fields:
• IceCreamFlavor
• Scoops
3. The IceCreamCone constructor calls two data-entry methods:
• GetFlavor(), which throws an IceCreamConeException if the flavor isn’t one of the following: vanilla, chocolate, strawberry, peach, or banana.
• GetScoops(), which throws an IceCreamConeException when the scoop quantity exceeds 3.
4. Create a program that establishes several IceCreamCone objects and handles any throw IceCreamConeExceptions.
5. Save your program.
6. Now “build” your program
Can sumone plz help me with this..its urgent....
Not sure about the rest of it, but Ctrl+S will help with step 5 and Ctrl+B should get you past step 6.
Good luck with the others. Be sure to post back with the grade you get!
Good advice. Of course, I'm disturbed at how poor the requirements are for this. For instance, a constructor calling either a poorly named method, or a really dodgy implementation. I'm sorry, but this whole mess would need to be redesigned and the tutor will be awarded an F for this very poor design.
|
|
|
|
|
Agreed. Poorly designed assignment, starting bad habits early.
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Malcolm Smart wrote: and since what every time when i want to add button to this control one add two times
Can you give me an original link to that gem?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
shaheen13 wrote: Can sumone plz help me with this..its urgent....
Sure. When you come round to my house and paint the kitchen for me - oh, and weed the garden. Then I'll code it up for you.
|
|
|
|
|
I see where you're coming from Pete but I think you're being a bit harsh... Gone are the days when students would be in class, make some notes, read the handouts, read the recommended text books, look at API documentation, or even ask the tutor. Where would we all be without google and code project hey!?
|
|
|
|
|
nelo_ wrote: I see where you're coming from Pete but I think you're being a bit harsh... Gone are the days when students would be in class, make some notes, read the handouts, read the recommended text books, look at API documentation, or even ask the tutor. Where would we all be without google and code project hey!?
You're right. It's far too harsh for me to expect somebody to actually be able to do something for themself. Obviously, my plumber just asks for somebody else to come and fit the bath for me, and he in turn asks somebody else - I suspect that there's only one plumber doing everybody's work for them. This explains why nothing ever gets done - that poor sod's far too busy.
|
|
|
|
|
Pete O'Hanlon wrote: I suspect that there's only one plumber
And he is actually the original poster, trying to cross train to be a developer!!
I'm sorely tempted to take you up on your painting / weeding offer though Pete, I'm so far behind with this project it's untrue. I'm packing the kids and wife off you with paint brushes and spades in hand.
Knowledge is hereditary, it will find its way up or down.
Luc Pattyn
and since what every time when i want to add button to this control one add two times
posted in C# forum
|
|
|
|
|
Malcolm Smart wrote: I'm sorely tempted to take you up on your painting / weeding offer though Pete, I'm so far behind with this project it's untrue. I'm packing the kids and wife off you with paint brushes and spades in hand.
Cool. When will I expect them? Have you posted them first or second class?
|
|
|
|
|
Well, the poster's profile claims that Job Title is Engineer. I'm glad we're working on ice cream and not skyscrapers. If that's the claim, then maybe some harshness is in order. If he/she needs homework help at the last minute "plz urgent", google can give results in under a second. Problem better phrased as "I'm having trouble understanding try/catch and making custom exceptions. Does anyone have a simplified explanation, my text is convoluted and the examples I've found on the net are not making much sense to me." Posted with the utmost respect for Mr. nelo_.
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
nelo_ wrote: I see where you're coming from Pete but I think you're being a bit harsh... Gone are the days when students would be in class, make some notes, read the handouts, read the recommended text books, look at API documentation, or even ask the tutor. Where would we all be without google and code project hey!?
I don't think Pete's being too harsh at all. You're right, "gone are the days when students would..." and that's the problem. The problem isn't resources like Google and CP. The problem is that students expect instant answers and other people to do their homework because they can't be bothered to learn the material and the professors (and/or tutors) are more than happy to teach to this increasingly downward trend.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Don't be too flippant, Pete. It's an urgent query, if you haven't noticed it yet.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: It's an urgent query, if you haven't noticed it yet
And I urgently mocked it. There was no delay, no flim flam. The mockery was instant.
|
|
|
|
|
|
Hi,
i'm trying To Display a Notification Form To the User Telling him that tha App is loading
Sql DataBase.
The frmLoading Load From Contains Label that states "Please Wait While Loading"
but when the Form Loads it do not shows me the Label and the Cursor over the Label is in
TimeClock Mode Like it's Waiting For Something!!!!,
The Thing is that The From is Active and can Be Moved
The Operation of The Fill Methods Takes Very Small Time Slice if The Connection Succeded
so the Form is immediatly Closed after Shown.
if the Loading Was Not Succesful
The Fill Methods Will Wait For A While if the Connection To SQL Server Could Not Be Done
The Point of the Form is to Give the User the Feeling That Something is Happening
I've tried a Thread But Got The Same resaults
Help AnyBody
Here is The Code :
<br />
try<br />
{<br />
frmLoading Load = new frmLoading();<br />
Load.Show();
<br />
TA_OCards.Fill(dS_CarManager.T_OpenCards);<br />
TA_CCards.Fill(dS_CarManager.T_ClosedCards);<br />
TA_Dest.Fill(dS_CarManager.T_Destinations);<br />
TA_Users.Fill(dS_CarManager.T_Users);<br />
TA_CDetails.Fill(dS_CarManager.T_CarDetails);<br />
<br />
Load.Close();<br />
<br />
}<br />
catch<br />
{<br />
MessageBox.Show("Server is Not Connectet, Please Try Later", "DataBase Error");<br />
this.Close();<br />
}<br />
<br />
Have Fun
Never forget it
|
|
|
|
|
If you get thrown into the catch block, you don't end up closing the fmrLoading form. Try rewriting this as:
using (frmLoading loading = new frmLoading())
{
loading.Show();
try
{
TA....
}
catch ( SomeAppropriateException here )
{
this.Close();
}
loading.Close();
} As a general note, try wrapping your code blocks in pre instead of code tags and don't catch general exceptions without actually attempting to catch more specific exceptions before hand.
|
|
|
|