Erik Westermann wrote: Exceptions are for exceptional conditions - conditions that are unexpected during normal circumstances. Exceptions are relatively expensive and aren't that great for stuff like this.
I was just watching the latest .Net show off MSDN and it is all about performance. One of the things they where saying is Exceptions are only expensive if you acctually throw the exception. This makes them very good for doing this sort of thing.
I want to lighten/darken the shade of a given color. I just wondered if there was a better way, than just adding/substracting an amout from each RGB value, because it in some cases, the difference in color is minute.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
I'm sure you can use bits of it but I'm not sure why you'd want to. You certainly can't (ar at the very least shouldn't) display a Windows Forms control on a web page.
I'm working on a small app that scrapes some HTML and parses out a few data items.
(specifically: I am trying to snag the 2 values for Total CPU Time (4:217:02:06:36) and Ranking (# 2,313) contined in the sniped below)
<br />
<tr bgcolor="#FFFFFF" onmouseover="javascript:style.background='#E5E5E5'" onmouseout="javascript:style.background='#FFFFFF'"><br />
<td>Total CPU Time (y:d:h:m:s) (Rank)</td><br />
<td nowrap="true">4:217:02:06:36(# 2,313)</td><br />
</tr><br />
Any suggestions on HOW? I am assuming that a RegExp might be the easiest, but I'm no wizard at creating those (i.e. any suggestions/help would be appreciated).
I want to make an automatic update system. Here is my simple plan for one:
At the begining of application init, the application will go into the updater block.
//////// Updater block psedo code
settings = Load application settings;
if (user wants auto updates)
{
//creat an instance of the updater from a library Updater.dll
Updater myUpdater = new Updater();
// updater goes online and check for updates
UpdaterFeedback = myUpdater.StartUpdater();
if (updaterfeedback == updatefound)
{
if (settings.totallyautomatic == true)
{
updater.doupdater
}
else
{
// ask user if they want to update & tell them about the update
// also give them some info on it
if (userWantsToUpdate == true)
{
updater.DoUpdate();
}
}
}
}
else
{
continue with the application startup
}
//////// End updater block
----------------------------
If you have any ideas, please post them
I have not a clue how to do the internet update check, if you have any ideas please post them.
well you could use the WebRequest classes to read a txt file from the net that has the latest version number for the app, and if not, downmload the new file. i cannot offer any more help on the matter, and next time, try thinking about it, istead of asking someone to write it for you, if you get stuck on a particular aspect of it, then we'll be more than happy to help.
Can some please explain how the "auto" paging option of the DataGrid web control is meant to work?
My datasource is a class derived from CollectionBase. Now the first page shows up fine, but when I click any other page number, nothing happens, the page does not display anything but the first page. The event gets fired as well, but that seems only of use when you want to do custom paging.
You still need to handle the event, even when it's automatic. All you actually need to do in that event handler is: DataGrid1.CurrentPageIndex = e.NewPageIndex but having to handle it yourself gives you the control to do other things.
For example, if you had an EditCommand column in the datagrid and someone hits edit on the fourth row, then pages to the next page, the EditItemIndex is still going to be set to 4, so you need to set it back to -1 in the PageIndexChanged event.
It was there in my datagrid but I thought that was just to pick up the information from the DataSet. You're right though, now I think back, you have to DataBind after setting the CurrentPageIndex, EditItemIndex or the SelectedItamIndex.
I don't understand why though and it can be very inconvenient.
I have played with NDoc a free open source doc generator for C#. However, it even though it does a good job a creating MSDN like, it is not 100% like the MSDN docs, the same with it's Java Doc output.
I was wondering if anyone knows of or has used other freeware/shareware/open source doc generators for C#. Since the only thing I can find is NDoc.
I played with an expensive commercial product that does a perfect and flawless job at generating MSDN looking docs and has a great interface. However it is very expensive for a single developer.
Now I do not know why .NET does not come with a built in tool like Java does. And the one in Visual Studio sucks big time, seems to have lots of bugs, or does not fully support all the .NET tags yet.
Anyways... thanks in advance for any input...
Aalst
Coding is a way of life. It's in the air we breath. It pumps through our vines. Without it we soon crumble to dust. - Rodney S. Foley