CSharpShooter's Q&A profile
SQL Server Train and test data sets
I've seen that sometimes is better to split the table into a test dataset and a training dataset, and I'll appreciate if anyone can explain why is this... thanks Santiago Acenolaza Argentina Usually after you finish building a data mining model, you'll want to test the accuracy of model against sample data. If you use the same data that you used in training, the model might show accurate results; but in reality it might have overlearned (or overfitted) on the data. Splitting the dataset into test and training allows you to validate the model accuracy on dataset it hasn't seen during training, which is more representative of the dataset it'll be used against for prediction. Let me know if you have any a ...Show All
SQL Server Management Studio 2005, SP2 - CTP: problem deleting old backup files in Maintenance Plan
I have a maintenance plan created on SQL Server 2005 SP2 CTP being run using windows XP account with Administrative privileges. One of the steps.. Maintenance Cleanup Task.. has been setup to delete Backup files older than 2 days. But this step fails with the following error: Executing the query "EXECUTE master.dbo.xp_delete_file 0,N'',N'bak',N'2007-01-28T01:00:02',1 " failed with the following error: "Error executing extended stored procedure: Invalid Parameter". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. The maintenance plan has become such a huge hurdle in SQL Se ...Show All
Windows Forms Binding Button Checked State
I want to make typical Bold, Italic and Underline buttons. How do you relect the state of the selected text in the buttons I can do it by calling the following function from the rich text box's mouse up and selection changed events, as well as every time one of the buttons is pressed: private: System::Void updateFontStyleButtons() { tsbBold->Checked = richTextBox1->SelectionFont->Bold; tsbItalic->Checked = richTextBox1->SelectionFont->Italic; tsbUnderline->Checked = richTextBox1->SelectionFont->Underline; } There must be a more elegant solution, though. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. PlayerIndex?
I need some help and explaining of PlayerIndex and how to use it. this is an example of what I want to do: "for (int i = 0; i < Players.Length; i++) { if (XInputHelper.GamePads[i\].APressed) { GamePad.SetVibration(i, 1.0f, 1.0f); } }" Players is an Array of all the player objects. I want to cycle all my players and start to rumble that specific controller, but I don't know how to easily transform the int i = 0 too PlayerIndex.One (i\ should be only i in brackets but this forum displays a light bulb if i write that) Cheers Alfons Hi, How about : foreach( PlayerIndex thePlayer in Players ) { if ( XInputHelper.GamePads[ thePlayer ].APressed ) { GamePad.SetVibra ...Show All
Visual C# XML
Hi, How can I decode data in an XML string Like when I get something like > or < in the raw strings, I would like to read or store them as > or < in my application. Regards Kiran Kumar Pinjala. When you have a node with test and childnodes you need to iterate through the nodes childs and find its Text node. Here is a sample code that will do just that. XmlNode node = doc.SelectSingleNode( "/root" ); foreach ( XmlNode nodetest in node.ChildNodes) { if ( XmlNodeType .Text == nodetest.NodeType) { System.Diagnostics. Debug .WriteLine(nodetest.Value); break ; } } ...Show All
Visual Studio Express Editions Beginer Help
Hey, I just downloaded VB Express a couple weeks ago. I'm having trouble finding resources for beginers. I've found all of the video series on microsoft.com but I want a bit more resources. Where can I find them www.google.com www.amazon.com Seriously, if you'r ehaving trouble with the resources you've found, you probably need to buy a good VB *language* book ( NOT one that teaches you how to create forms and use the designer ) and work through it. I bought 'teach yourself C++ in 24 hours' 8 7 odd years ago, and worked through it, I got my first dev job 6 months later ( obviously by going on to more advanced books and learning more than that book taught me ). There's no harm in starting with a s ...Show All
Visual Studio More custom code questions
I've been through Brian Likes's custom code blog entries and I can get code to work but only the easiest of examples. I'm using a local report rather than SQL reporting services so I think that a custom assembly might be easier in my case, and hopefully the deployment code (likely ClickOnce) will understand that there is a referenced assembly. But using a custom assembly or even just local code, I can get Hello World to work but I can't figure out how to pass the report variables such as Field!MyPerson.Value to the code in order to do anything useful. If anyone has a suggestion as the the passing mechanism I would greatly appreciate an example. I'm getting a compile error about an instance requiring an object reference. I declared my f ...Show All
Visual Studio Express Editions Linklabels to open files
Hi, I've got a uni project that needs doing, but I've ran into a bit of a hitch. Basically, I have a linklabel which is needed to start a program and open a file in said program. Opening a program is not a problem, but opening the file is being a pain because the filename will not recognize spaces, eg, it doesn't like the directory 'My Documents' because there is a space in the middle. Any ideas on how I can get around this Thanks, Bort This is the code I'm using: System.Diagnostics.Process.Start ( "winword.exe" , "D:\Documents and Settings\Bort\My Documents\address label.doc" ) Word opens fine, but then starts giving me error messages saying it can't find D:\documents.doc, then it has problems ...Show All
.NET Development Dns.GetHostEntry does not resolve host names same as NSLookup does (for alias addresses)
Hi everybody, Result of NSLookup: > 10.10.10.128 ... Name: ocs.ims.integ Address: 10.10.10.128 > 10.10.10.129 ... Name: ocs2.ims.integ Address: 10.10.10.129 Result of Dns.GetHostEntry(IPAddress.Parse("10.10.10.129"): AddressList [0] 10.10.40.233 [1] 10.10.10.128 [2] 10.10.10.129 HostName "ocs.ims.integ" --- instead of "ocs2.ims.integ" Is there any possibility to make a DNS query to resolve the host name of an alias address I run multiple instances of a server on a single machine and need to know the host name of each instance. Regards, Paul ...Show All
Visual C# undo manager
Hi all, I have a C# application that was written using VS2003 and has since been converted to VS2005. When I try to debug the application, I get the following error message: Error connecting to undo manager of source file pagename.aspx.designer.cs Can anyone shed some light regarding what this is Thanks, Dan I too was having this issue. I was using VS 2005 with the web project add-in. I found that if I excluded the offending aspx file from the project, then added it back in, the error disappeared. ...Show All
SQL Server CONTAINSTABLE inconsistency with phrase
Hi I have a table in Sql Server 2000 with full text indexing setup on a column called 'contents' with a datatype of Text. The column contains HTML, and I want to search for a particular link eg. <a href="/hm/default.aspx i=40559#secure"> ..by using the following phrase: /hm/default.aspx i=40559 ..in a CONTAINSTABLE query. I need to find the phrase within the html. This is tricky because containstable only allows a wildcard at the end of the phrase, ie I can't search for '*/hm/default.aspx i=40559*' with an asterisk at each end. BUT, when I try the following query on my development server, it works without any asterisks: SELECT item_id, contents, a.RANK FROM CONTAINSTABLE(item, contents, '/hm/defau ...Show All
Visual Basic Degug on only one form of a soultion
Hello. A question, please. I have a solution which has many forms. If for example, my projet doesn't compile for any reason, can I degub only a form of the solution How thanks... The entire solution is either in debug or not.... If you need to debug a single form you have a coupl eof options....the prefered method would be to put a break point in the forms load or initialize event and then step through the code to debug it...another otpion would be to export the form to a test project and debug it from there! Furthermore if your solution does not compile because of errors...the errors and warnings window will show you the line number, error, and file name for the source of the error...you c ...Show All
Smart Device Development Which Platform?
I have written an application using VS 2005, and installed it on a pda(s) running Windows Mobile 5.0. Now, what I want to do now, is to load the same application on to a Windows CE 5.0 environmnet as well. Looking at it, it should work The main question I have is that once loaded on either enviroment, I need to know which one the application is running. If the application is running on WM 5.0 follow a set up route of say a) or if it is CE 5.0 then do b). Not too much differnce to be honest, but I was wondering if there was some system variable that I could look at, which would indicate the environment - WM 5.0 or CE 5.0 Code I've posted is for VS 2005 already, there's nothing to "expand". There's no C ...Show All
Visual C++ Error message PSAPI.DLL
I am getting a error pop up saying Get Process Image file name w. could not be located in the dynamic link library psapi.dll What should I do to fix this. April I'll try again in the morning, but I think its popping up after I boot up. It just started coming up after I did the fix on the genune Mircosoft. And that problem might have been linked to a problem that was created not long after I got my computer and all my programs where in (almost 2 years ago), I made sure I had everything set up with all of my Gallery Programs, then I did a check point for system restore. About a month later, I get a windows update, ok thats fine, but the next day when I boot up, I get a pop up that says, "you ha ...Show All
Visual Studio Express Editions Help Clearing All Textboxes and All Comboboxes
Greetings: I found this helpful code elsewhere on the forum, but it is only working on the Combo Boxes and not the text boxes on my Form1. Currently I have 4 textboxes and 3 comboboxes on my form. In the editor, when I hover my mouse over "ComboBox" it says "Class ComboBox" and when I hover my mouse over "TextBox" it says "Interface TextBox." Any ideas or help is greatly appreciated. Thanks Glenn Public Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click For Each c As Control In Me .Controls If TypeOf c Is TextBox Then ...Show All
