|
Hello sir.
I have Big Problem in Middle Tire . what is this and why we used in .NET.
what is the baniftes of it. if u have ay example related to Midle Tire . then plz send me . my Email id is (khan.naim786@yahoo.com).
|
|
|
|
|
naim khan wrote: I have Big Problem in Middle Tire
I've always thought that Reliant Robins[^] are very strange cars and often they have a problem with their middle tire - well, the whole of the middle wheel.
Seriously now, as far as I can see you do not have a problem with your middle tier because it would appear that you don't have one. You have a problem with not having one.
naim khan wrote: what is this and why we used in .NET.
It is not just .NET it is any software development. You might want to read multi-tier architecture[^]
naim khan wrote: my Email id is
Keep it on the forum. If you keep it on the forum other people benefit.
|
|
|
|
|
Colin Angus Mackay wrote: very strange cars
Well, one got Del Boy and Rodney through all the series.
Ko seje so, nicu mu skakavci.
|
|
|
|
|
I would recommend running your posts through a spell checker, although it wouldn't have fixed 'tire', it would have fixed 'baniftes', and other stuff that makes this hard to read.
Beyond that, it's plain you have absolutely no idea what you're doing. So, buy some books and read them.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello,
I'm interested in being able to pull the value of a cell in a selected row as the Type that the value was originally added to the DataGrid.
The data values are hWnds of all current process threads, which is of type System.IntPtr for the purpose of ShowWindow().
However, when I attempt to use the .Value with ShowWindow() as follows:
ShowWindow(dataGrid["hWndValue", dataGrid.CurrentRow.Index].Value, 1);
the call fails citing: cannot convert object to System.IntPtr.
I'm wondering if there is:
1) a way to convert the .ToString() value of dataGrid["hWndValue", dataGrid.CurrentRow.Index].Value to System.IntPtr?
2) a way to maintain the type of the data that was placed into the cell in the DataGrid?
Obviously, I'd rather not "be sloppy" and convert from a string to a IntPtr, but it'll work.
Any input is appreciated.
Thanks very much,
Matt Brown
[edit]
Although the above may be useful for me or others in the future; I was able to read the values into both a dictionary and the datagrid row, maintaining the type and allowing a lookup.
Dictionary<string,> ThreadHandles = new Dictionary<string,>();
try
{
ThreadHandles.Add(sb.ToString(), hWnd);
dataGrid.Rows.Add(sb.ToString(), hWnd);
}
catch
{
dataGrid.Rows.Add(sb.ToString(), hWnd);
}
[SOLUTION]
Thanks howlettt for the solution!
ShowWindow((System.IntPtr)(dataGrid["hWndValue", dataGrid.CurrentRow.Index].Value), 1);
modified on Friday, February 27, 2009 3:08 PM
|
|
|
|
|
ShowWindow(dataGrid["hWndValue", (System.IntPtr)dataGrid.CurrentRow.Index].Value, 1);
Should work
|
|
|
|
|
Wow, cool. Can I convert any type to any other type with the same syntax type thing? Awesome!!!
for others: the proper syntax for what I'm trying to do is:
ShowWindow((System.IntPtr)(dataGrid["hWndValue", dataGrid.CurrentRow.Index].Value), 1);
|
|
|
|
|
C# requires explicit casting more often than C/C++, but in general as long as it logically makes sense to do so you're just as free to make casts.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
|
Dear holders of hope,
Does anybody know if IE Mobile 6.0 supports the DIV's overflow:auto attribute? Everything works fine in a normal desktop browser.. but IE mobile does not keep the div's fixed size, and no scrollbars are rendered.
I would greatly appreciate any one with either a solution or a workaround as to how to make a fixed contentholder (such as a DIV) whose contents' size exceeds its own size.. and thus creates scrollbars in IE Mobile 6.0.
Thanks in advance. I've been tearing my hair at this for hours :/
DWG
|
|
|
|
|
In the following String.Format call it will format a number to 6 zero-padded digits, prepend the plus or minus sign and then pad with a space on the left to 8 characters:
String.Format({0,8:+000000;-000000}, num); // result is of the form " +002009"
What format string can I use to format a number to 7 space-padded digits and prepend the plus or minus sign before the spaces? I am looking for something like
"+ 2009"
Beth
|
|
|
|
|
bscaer wrote: What format string can I use
I don't know but they have probably hidden that information in the documentation[^]
We keep complaining about that but they just keep doing it. Oh well.
|
|
|
|
|
Thanks for the link. I have spent quite a bit of time reading the documentation but it seems to be incomplete, at best.
|
|
|
|
|
bscaer wrote: Thanks for the link.
That was a bad link, sorry.
Standard number formats[^]
Custome format strings[^]
bscaer wrote: but it seems to be incomplete
Not the documentation. Sometimes all the information you need is not on a single page but there are links to the additional pages.
Perhaps the formatting support does not provide for your specific goal. If that is the case then you will have to provide your own implementation.
|
|
|
|
|
I don't think she would have gotten as far as she did without having read the documentation; I know I wouldn't have.
|
|
|
|
|
Will this suit the need?
System.Console.WriteLine ( "{0,1: + ; - }{0,7 : 0 ; 0 }" , 2009 ) ;
System.Console.WriteLine ( "{0,1: + ; - }{0,7 : 0 ; 0 }" , -2009 ) ;
(SPACEs added to avoid smileys; remove them.) (Third try.)
modified on Friday, February 27, 2009 1:55 PM
|
|
|
|
|
Yes, that is brilliant! Thank you
|
|
|
|
|
Glad to be of service.
I was also just looking for a solution using my ApplyFormat[^] method, but no joy.
I had hoped that this would do it:
System.Console.WriteLine ( 2009.ApplyFormat ( "' '+;-''#####0;#####0" ) ) ;
System.Console.WriteLine ( (-2009).ApplyFormat ( "' '+;-''#####0;#####0" ) ) ;
Apparently the number sign (#) format character doesn't perform padding.
(Apparently its only purpose is to result in an empty string when the value is zero. Yeah, like that's useful. )
I guess that means I can add more functionality to my method to support it. Yippee, something to do.
|
|
|
|
|
From my experimentation it seems like the number sign (#) is only useful when specifying the location of a special character, like a comma, such as in String.Format("0:###,###,###").
|
|
|
|
|
Ah, that too. Darn, there needs to be another option, like '9' to specify left-padding.
I've forgotten everything I learned about COBOL, so I forget how this was handled in it.
|
|
|
|
|
PIEBALDconsult wrote: I've forgotten everything I learned about COBOL, so I forget how this was handled in it.
You can fix that easily by following some links at the bottom[^].
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
I already did some searching; I now know almost as much about COBOL as I used to.
|
|
|
|
|
IIRC it also lets you pad to the right of a decimal. Unfortunately I don't know how to pad to the left.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
I appears that the formats themselves don't pad (other than with zeroes), that padding is handled by the WriteLine , string.Format , etc. that calls it.
I assume that the creators of the formatters decided that if the caller was going to do the padding, then they didn't need to. Which makes sense, but there are cases when the caller isn't going to do the padding so the formatter should be able to.
Because my ApplyFormat method is a caller of formatting, I now have to decide how best to allow the user to specify padding.
I'm thinking I should follow Microsoft's lead and allow the format to be prefixed with "n:" to specify a minimum width of n characters.
|
|
|
|
|
similes avoided spaces.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|