..well, while I agree that a C# grammar is probably available somewhere and ready to be used with Flex/Bison or what have you,
I don't find "reading a grammar" such a hassle.
The fact that you mention regExes makes me wonder if you're thinking about tokenization, rather than parsing-per se.
Sure, tokenization may be a hassle, but once you solve the problem,
parsing becomes a much more manageable problem, I think.
After all, at the worst, you can do a Recursive Descent Parser (dumb, brute force kind of approach).. sure, it's probably not the fastest approach, but it works!
Anyway, good luck on finding a grammar for C# (maybe the M$ site has something like that?)..
and be sure to share when you find it
i have set the DataGridColumnStyle in my datagrid of DateTimePicker control...but the problem is i unable to preserve data in cell....when i change the focus from the cell....pls tell me what should i do? code is given below...
// This example shows how to create your own column style that
// hosts a control, in this case, a DateTimePicker.
public class DataGridTimePickerColumn : DataGridColumnStyle
private DateTimePicker myDateTimePicker = new DateTimePicker();
// The isEditing field tracks whether or not the user is
// editing data with the hosted control.
private bool isEditing;
public DataGridTimePickerColumn() : base()
myDateTimePicker.Visible = false;
Well, firstly you can use the SQL Aggregation functions MIN and MAX on the columns... i.e. SELECT MAX(xCord) FROM Coords.
If you want to tie it into one query you'll probably have to start using sub-queries.
Performance wise, I'm not sure how you'll optimise it. The only other alternative would be to re-visit the design so that if it's read-intensive that the majority of the calculations etc. are done during an insert or update, whether that's possible (and how it might be so) is dependent upon the application and design, sorry to be so vague
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"
I wrote to a StreamWriter sitting on top of a NetworkStream, but calling Flush() didn't help get the data to the client. I understand that NetworkStream doesn't buffer and NetworkStream. Flush doesn't actually do anything - data written did not get flushed to client.
But, it is StreamWriter.Flush() that I called. To resolve the problem, I just called Close on StreamWriter - which calls flush internally according to MSDN. Data is flushed to client side.
Actually, see the constructors for StreamWriter: they do buffer, and if you use Reflector, they use a default buffer size of 1024. Try creating a StreamWriter specifying a buffer size of 0, and see if it helps.
You can do it on anything you choose - from .bat to .net - A customer
I wanna wrap one c/c++ library into a COM dll to use in c# or vb.
In Atl, "int*" will interept as "ref int" in c#. But i wanna it be IntPtr because I try to connect it with Bitmap's Scan0(which is a IntPtr).
Any idea or suggestion?
Philip Fitzsimons wrote: I mean what stupid idiot thought that you would never want to read more than int.max?
whay not a long??????
The same stupid idiot that knows one cannot address more than 16gb memory...
BTW Streams work with long, thus one can set the position virtually anywhere within a Stream and read a normal 4k/8k byte array at a time.
David Stone wrote: It's far more efficient to load smaller chunks and deal with them individually rather than do it all at the same time.
Yes, that is true when all objects are available before runtime(and stored somewhere). But what if all our required objects should be created at run-time, and be stored in memory? maybe I should create an ArrayList of Arraylists if needed!
Is there some sort of XOR painting that uses a Graphics object and/or takes advantage of clipping?
It seems like I'm stuck using ControlPaint.DrawReversibleFrame for drawing XOR rectangles, and it'd be a minor pain to have to write some intermediate code to handle the clipping and draw line segments...
But then again, maybe I'll just not end up using XOR mode in the end.