2,157 Posted Topics
Re: The problem might be that you are trying to mix Integrated Security and providing a userid/password. Normally you'd put [code]Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;[/code] For integrated security and [code]Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;[/code] For userid/password | |
Re: I'd also switch to the [URL="http://www.oracle.com/technetwork/topics/dotnet/index-085163.html"]Oracle ADO.NET[/URL] provider instead of using the ODBC one. It's been optimized for Oracle access. | |
Re: In OnStart you would start another thread that does the actual work for your service. In the documentation they mention using a timer to trigger an event to check if your service does something. In OnStop you'll need some way to signal your thread to stop running (following the MSDN … | |
Re: [code]private void Form1_Load() { Form2 myForm2 = new Form2(); myForm2.ShowDialog(); // forces user to interact with Form2 }[/code] | |
Re: You need a class to hold those:[code]namespace ConsoleApplication1 { class MyClass { // create a new binary tree bt = new TBinarySTree(); // etc.[/code] Statements (like 'if') need a method in the class. | |
Re: It looks like they ran it through an obfuscator so you can't easily decompile it to get the source code. You can still get the source code, but you'll have to read what was decompiled, figure out what it is doing and substitute your own variable names/procedure names into the … | |
Re: You should get an error on line 27 where you try to parse the value. Use [URL="http://msdn.microsoft.com/en-us/library/dd783499.aspx"]TryParse[/URL] to ensure you have a valid value. | |
Re: These lines [code]string[] firstName={}; string[] lastName={};[/code] declare them as zero length arrays. You then try to insert 10 items into these arrays (which, again, have zero length). You need to declare them as arrays of length 10: [code]string[] firstName = new String[10]; string[] lastName = new String[10];[/code] | |
Re: [code]town.ParentNode.Attributes.ItemOf["code"].Value[/code] Don't do a lot of work with XML and you might be able to skip the ItemOf and just index off of Attributes. | |
Re: [URL="http://en.wikipedia.org/wiki/Deadlock"]Deadlock[/URL] occurs when you have two or more processes are waiting for the other to finish, so none of them do. | |
Re: What do you mean by "doesn't work"? There is nothing wrong with the syntax and you never use the variable in your code so how would you know if it 'worked' or not? | |
Re: What result do you get when you enter 16 into your application? | |
![]() | Re: Line 16 of FaveoService.cs says you are returning an IEnumerable<SRType> but your receiving end, line 6 of Program.cs is trying to put it into an FaveoServices.SRType[], not the same type at all. The reason it appears to work in the debugger is you are looking at what happens when you … ![]() |
Re: Add your picture to an ImageList then set the transparent color to the imagelist: [code]ImageList myImages = new ImageList(); myImageList.TransparentColor = Color.Magenta; myImageList.Images.Add(myImage);[/code] Then when you need to add it to the picturebox: [code]pictureBox.Image = myImageList.Images[index_of_image];[/code] Please note that I used C# as the coding format as this is the … | |
Re: Sounds good, but I'd split the Communication Management System dll into three parts, each one handling communication to one section of your design (control panel communications, service communications, user communications). | |
Re: [QUOTE=prabhux;1475529]can you write me why you used two back slashes in this statement. safe = regex.replace(safe, "[^a-z0-9\\-]", "")[/QUOTE] Backslash is used as an 'escape' character for when you want to indicate something special. For example '\w' means 'word' in a regex and is a shorthand way of saying "anything made … | |
![]() | Re: countDown is used to limit the number of times the loop runs. Notice the while statement condition right after that line. If you never subtracted from countDown, that statement would always be true (unless the user entered a negative number in line 7) and the loop would run forever. |
Re: There are three ways to go about this: [LIST=1] [*]SQL provider [*]LINQ to SQL [*]LINQ to EF [/LIST] LINQ to SQL is probably the easiest to use, so let's try that one :) First we need a table on a database. We'll pretend we have one and it's very simple, … | |
Re: [code]int? contactNumber = null; if (myTextBox.Text != String.Empty) { contactNumber = Int32.Parse(myTextBox.Text); } // contactNumber is now either null or contains the number or an Exception was thrown because Parse was unable to convert what was entered.[/code] | |
Re: Create a new exception class as described. Develop a method that validates code. Develop a routine to read form, call the validate method and display the form if no exception. | |
Re: If the internal class isn't public then other classes cannot 'see' it. | |
Re: Just wanted to point out that your answer is wrong. There are only 15 combinations. | |
Re: It depends on how the file itself is encoded. If it's an ASCII encoding (UTF-8) then 100 bytes = 100 characters. And just to confuse the issue more, sizeof(char) can vary from 1 to 4 bytes depending on what unicode character is being represented. Most of the time you'll only … | |
Re: Just use [URL="http://msdn.microsoft.com/en-us/library/system.net.ipaddress.any.aspx"]IPAddress.Any[/URL] and you don't have to worry about the local machines IP address. You will most likely have to configure your router to forward the port(s) you'll be using to your machine, however. | |
Re: Move these lines to before the while statement:[code] cout>> "Enter initial payment: "; cin>>total;[/code] Move this line into the while statement (before the counter increment):[code]cout << "The total per year is: " << total << endl;[/code] I'd also change that line to indicate what year it is reporting on. Also … | |
Re: You asked the exact same question yesterday and I answered it then. [url]http://www.daniweb.com/forums/thread346872.html[/url] | |
Re: I'm not sure what you are asking here. You do things in a very odd way and you've hard coded some of the values that shouldn't be. Can you explain more about what you do/don't want to do? And you have an error in Display. | |
Re: Someone asked a this question the other day, but wanted to catalog DVDs rather than books. No, you can't name the object after the book title, but you can create an [URL="http://msdn.microsoft.com/en-us/library/xfhwa508.aspx"]Dictionary<TKey, TValue)[/URL] and use the title of the book as the key. | |
Re: I've taken math all they way up into the 400 level. While I've never used it on the job, I can see where some programming being done would require that level of math. As the previous poster said, it hasn't hurt either :) Six more math classes and I would … | |
Re: Here is the code block that is causing your problem:[code]public String processInput(String theInput) { String theOutput = null; String menu; switch (state) { case WAITING: { theOutput = "Do you accept the TOS?"; state = SENTTOS; return theOutput; }[/code] Notice when you format it properly that you are missing '}' … | |
Re: Do you want to make a proxy or are you trying to intercept the traffic before it's 'seen' by the application requesting the data? First easy, second requires rewriting the windows TCP stack. | |
Re: Works fine for me. What numbers are you entering that make you believe it isn't? | |
Re: [code]public void splitData() { foreach (string line in lines) { parts = line.Split(','); } Array.Sort(parts); }[/code] This code is your problem. Each time the loop runs parts is replaced with whatever the current split is so the end result of this code is just the last line split. I suspect … | |
Re: You don't. If you could what would stop me from running a program on your computer? | |
Re: I'm not sure what you are asking, but maybe this will help: [code]if (text1.Text.Length == 0) { messagebox.Show("error 1"); } else { if (text2.Text.Length == 0) { messagebox.Show("error 2"); } else { // both are ok, do whatever here } }[/code] | |
Re: Something needs to activate it, so what will that be? | |
Re: (startingNumber % (10 ^ sigdigit))/(10 ^ (sigdigit - 1)) | |
Re: Virtual methods are overriden in a derived class, so you could create a base class that has signatures for all the methods you need, then derive a beginner and advanced class from these. Then when the user chooses you create an instance of whatever class you need and the rest … | |
Re: IRQ problems on new computers can be caused by a faulty install of the OS, or they mass copy the OS install onto the HD and used the wrong one. Return it, it's new and should work out of the box. | |
Re: [URL="http://sourceware.org/cygwin/"]Cygwin[/URL] | |
Re: What defines "fine" as it's not matched parens (first example has 4 open and 3 close). As for skipping number, operators, just don't include the last else as you don't need to do anything with them. | |
Re: You do something along these lines [code]Range rg = worksheet.get_Range("A1","E1"); rg.Select(); rg.Font.Bold = true; rg.Font.Name = "Arial"; rg.Font.Size = 8; rg.WrapText = true; rg.HorizontalAlignment = Excel.Constants.xlCenter; rg.Interior.ColorIndex = 6; rg.Borders.Weight = 3; rg.Borders.LineStyle = Excel.Constants.xlSolid; rg.Cells.RowHeight = 38;[/code] | |
Re: You should create a class to hold the methods needed to do the background work. In this class you would have a method "DoWork" which is where all the work would be done. It would also include a method "Abort" which would set a boolean to let the thread know … | |
Re: Could you possibly use code tags and indicate where the error occurs? | |
Re: You don't check if the left/right node is null, you just tell it to go visit that node. Try not visiting null nodes. | |
Re: [code]string sentence = "please help"; char[] charSentence = sentence.toCharArray(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < charSentence.length; i += 2) { builder.Append(charSentence[i]); } println(builder.toString());[/code] | |
Re: Objects, if well designed, increase code reuse. Just take a look at all the class libraries available. | |
Re: I suspect that it has to do with you never destroying the Command object. You've already added parameters to it once, and next time through you add even more parameters, thus the error. |
The End.