|
Hi All,
Is it possible to flush the code output by JIT?. I want to force the CLR to recompile on the fly.
This problem I am investigating is similar to self modifying code.
Jeff
|
|
|
|
|
|
I googled. Got nothing. I have a class called Square which extends PictureBox. Now I have a class called Tank which extends Square:
public class Square : PictureBox
{
public Square (int type, int row, int col){}
}
public class Tank : Square
{
public Tank (Bitmap[] images, int type, int row, int col){}
}
I tried super like Java uses but it doesn't exist so how do I call Square's constructor from Tank's constructor?
|
|
|
|
|
public Tank (Bitmap[] images, int type, int row, int col) : base(type, row, col) {
}
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
|
hi
how can i convert access database to sdf database for PPC ?
thanks
|
|
|
|
|
I'm trying to update a project to use System.XML.Linq and I'm now happily working with XDocument and XElement etc... It's very cool by the way if you haven't tried it.
The only problem I have is in one method I have to pass the full xml as a string, but XDocument.ToString() only returns the root and child nodes and not the xml header. Previously I used XMLDocument.OuterXML.
I there any equivalent in XDocument or a way of converting an XDocument to an XMLDocument?
*Edit*
I've found a 'dirty' way of doing it:
string xmlString = myXDocument.Declaration.ToString() + myXDocument.ToString(SaveOptions.DisableFormatting);
but there must be a better way than this!
modified on Sunday, January 20, 2008 11:54:14 AM
|
|
|
|
|
What's wrong with the "dirty" way?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Nothing I suppose, I expected a new class specifically designed to work with xml to have a method that would either return the xml as a string, or an XmlDocument at least, for compatability.
I just thought I was missing something obvious.
It appears that the only way to actually get full valid xml out of of it after you've finished manipulating data is to either save it to disk or to use a TextReader.
I've created my own class inherited from System.Xml.Linq.XDocument and added ToXmlDocument() and two ToXmlString() methods (one that allows formatting) so I have the functionality I need.
|
|
|
|
|
hye,
(Using DShowNET)When i call this FindPin(), it returns nagative value.I m calling it like this;
ICaptureGraphBuilder2 capGraph;
IPin pin;
Guid pc = PinCategory.Capture;
Guid pt = Guid.Empty;
int hr = capGraph.FindPin(
Device(which i found attachd),
1,
ref pc,
ref pt,
false,
0,
p);
and it returns negative value(-214...). I checkd the parameters during debugging, no problem in them then Whats wrong m i doing?
B!z
|
|
|
|
|
B!Z,
I don't know anything about ICaptureGraphBuilder2, but from your code you don't construct the capGraph or pin object.
This might be the problem...
Regards,
Gareth.
|
|
|
|
|
No. coz last time when another function returned this same negative value (-214...), the problem was not in that function itself. And BTW i wrote "ICaptureGraphBuilder2 capGraph;", its not actually like that(coz the code was bit lengthy so included that method only). i just wanted to tell that capGraph is actully its object.Anyways thx for the reply.
Anyone else who worked using DShowNET by .NET master?
B!z
|
|
|
|
|
Hi all,
I have a question regarding a Listview focus: Whenever this control loses focus to another control (e.g. checkbox that's being clicked at the same form), the selected lines are switched from blue to grey. Is there a way to keep the listview always focused, without calling its Focus() method every time another control gets it?
Thanks a lot,
Eyal.
|
|
|
|
|
I assume you mean that you want it always to appear the same as it does when it has the focus.
If so, you'll nead to create your own class inheritting from ListView and override the OnPaint event and possibly the OnLostFocusEvent.
|
|
|
|
|
Hi all,
I need to reconstruct the exact view of a listview after updating it's data. There is no problem if all the lines are visible. However, if some of it is hidden (a situation where a vertical scrollbar appears), updating the list always brings the first line to be first viewed, meaning that some lines that were previously visible are now hidden.
Does anyone knows how to reconstruct the exact location as before the update procedure?
Thanks,
Eyal.
|
|
|
|
|
You best bet would probably be to use the TopItem[^] property.
You would need to get the index of the TopItem before updating the list, then restore the TopItem after the refresh. You will need to take into account the fact that the "saved index" may not exist in the updated list.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Or,you can use listView.EnsureVisible(index) ,it will let the item[index] auto visiable .. good luck
|
|
|
|
|
Playing around with the new SyncFramework is proving to be a pain. I can't get one demo application to work and the API Object Model is not as straight forward as one would think. That coupled with major changes of biblical proportions between the Betas and the CTPs is a sure recipe for mayhem.
I'm getting this exception thrown:
Exception: An error occurred when enumerating changes in the client database. Check the inner exception for more details.
InnerException: The column name is not valid. [ Node name (if any) = ut0,Column name = __sysInsertTxBsn ]
Now I got the code off of this article by Rafik Robeal: Clickety[^]
If anyone can shed some light on the subject, please do. I'm this close from giving up as I've been playing around with this framework since the 8th of January.
[edit]
I forgot to add that this issue occurs when the synchronization is set to Bidirectional[default for the demo app] or UploadOnly. Snapshot and DownloadOnly works fine (although the synchronization fails )
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
"Animadvertistine, ubicumque stes, fumum recta in faciem ferri?"
|
|
|
|
|
Hi all,
I have a design question for an application I'm developing:
At the main GUI screen I'm having a list if items at a listView, where each entry represents a backstage complex object.
Backstage, I have a list of these objects (List<t>). The order of the items at the ListView is the order of the items at the list, meaning whenever I want to sort the ListView according to one of it's columns I'm sorting the list and then call an invalidate function to update the ListView. Think about the windows task manager as a model for this design: list of processes, which can be sorted according to several criterions (e.g name, CPU, mem usage etc.).
To me, it doesn't makes sense that whenever I'm sorting this view a big objects list is being sorted, and this design is causing several problems, for example: I can't sort the ListView while a certain task is running on the List, since the object's order will be changed and a whole mess will occure...
I'll appreciate any good ideas regarding how to separate the ListView from the object's list and still to be able to tie a ListView item with it's corresponding object in a fast and reliable way.
Thanks!
|
|
|
|
|
Good Day to all,
I've read article (http://www.codeproject.com/KB/cs/hard_disk_serialno.aspx ) here in CodeProject that is about retrieving the manufacturer's serial for a certain physical hard drive.
What I need is the one that can get the manufacturer's serial for a FLASH DRIVE, the usb type thing.
Is there any articles on how to do this?
PS: I'm after the real SERIAL, not the WMI type.
Thanks,
Ian
|
|
|
|
|
|
Yes there is. Sorry, that was a misfire. Submitted the original question.
|
|
|
|
|
Have you left a message for the author of the said article? There is a forum at the bottom of the article page.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
No, but someone already posted this same question. And the author seems to be already inactive.
|
|
|
|
|
MyReport rpt = new MyReport();
rpt.SetDataSource(MyDataset.Tables[MyTableName]);
rpt.SetParameterValue("MyParameter");
MyReportForm rptForm = new MyReportForm(rpt);
I was wondering if there's a smarter way to do maybe by converting my report once to object but then I cant access all the report's methods and members like the setting the datasource and the parameters.. I was thinking:
object rpt = new MyReport();
rpt.SetDataSource(MyDataset.Tables[MyTableName]);
rpt.SetParameterValue("MyParameter");
<font color="#00aadd">rpt = new AnotherReport();</font>
rpt.SetDataSource(MyDataset.Tables[MyTableName]);
rpt.SetParameterValue("MyParameter");
Thank you guys
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|