152 Posted Topics
Re: This appears to be an exact repost of [URL="http://www.daniweb.com/forums/thread161674.html"]this[/URL] DaniWeb post...? | |
Re: Check out this link: [URL="http://stackoverflow.com/questions/1011339/how-do-you-make-a-http-request-with-c"]http://stackoverflow.com/questions/1011339/how-do-you-make-a-http-request-with-c[/URL]. | |
Re: Hmm... seems to work fine for me (Mac OS X 10.6/g++) Random stuff... you mean a lot of 'a' characters? When I ran your program as-is, here was the output (my input file has 2 lines - "a dog" and "a cat"): [QUOTE]aa adaoagaaa acaaata[/QUOTE] Of course, that's because each … | |
Re: Just make a new instance of the "Service1SoapClient", like this: [CODE]Service1SoapClient myWS = new Service1SoapClient();[/CODE] Then, you should see your methods on the "myWS" variable: [CODE]string sResult = myWS.CelsiusToFahrenheit("25");[/CODE] You may have to include the namespace, if you did not put it in the "using" section: [CODE]ServiceReference1.Service1SoapClient myWS = new … | |
Re: Your seekg positioning is off. When you add records, you use: [CODE] fio.write((char*)(&t1), sizeof(t1)); fio.write((char*)(&active), sizeof(active));[/CODE] but when you look for records in your modify and delete, you use: [CODE]fio.seekg((number + 1) * sizeof(t1));[/CODE] all well and good, but you are not accounting for the 1 byte boolean (active) that … | |
Re: Because the "else" condition for your invalid character check is only on the "if (fare == 'C' || fare == 'c')" statement. If the user enters an "s" or "S", it does everything you want, but then falls to the "if" statement for "C", and, failing that, it shows the … | |
Re: Start here: [URL="http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx"]http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx[/URL] | |
Re: Really? I ran this and I got 0x01. Here's the code (Eclipse Helios on Windows 7): [CODE]public class ArrayRefTest { public ArrayRefTest() { //Default Constructor } public static void main(String[] args) { ArrayRefTest a = new ArrayRefTest(); a.foo(); } public void ChangePrimitiveArray(byte bytes[]) { bytes[0] = 1; } public void … | |
Re: Check out this thread: [URL="http://www.pcreview.co.uk/forums/desperately-seeking-ability-add-new-row-my-datagridview-t3223011.html"]http://www.pcreview.co.uk/forums/desperately-seeking-ability-add-new-row-my-datagridview-t3223011.html[/URL] It sounds like a similar issue. | |
Re: Perhaps this: [CODE]try { FileSystem.CopyFile(fSource, fTarget, UIOption.AllDialogs, UICancelOption.ThrowException); // Throw exception if user cancels foreach (ListViewItem checkItem in listView_left.Items) { if (checkItem.Text == lItem.Text) { listView_left.Items.Remove(checkItem); } } listView_left.Items.Add((ListViewItem)lItem.Clone()); reload(lItem, fSource); } catch (OperationCanceledException ocex) { // The user canceled }[/CODE] | |
Re: Well, a couple of things: 1) After you've selected from the first choices, you go into the "checksize" function. Here, you state that you can enter 'restart' to restart the ordering process. Your function is expecting a number (diameter of the pizza) - but if the user enters 'restart', they … | |
Re: Is there a reason why you have to set up the methods to take a type of "Object"? Will your "main" program accept DLLs that pass structs/classes of many types? Even if that's the case, your main project will still have to know about them in order to cast the … | |
Re: Does the "ref" value for the variable "SessionNumber" that gets returned to your calling program get set to "ERROR", or does the whole thing blow? If so, you may want to trap the exception to see what its giving you. [CODE]try { System.Diagnostics.Process.Start(target); SessionNumber = "SUCCESS"; } catch (Exception ex) … | |
Re: Are you checking the contents of the output file while the program is still running? Normally, when the file is closed (either explicitly, or when the object is disposed and the GC cleans it up), the buffers will be flushed. If you want to check the status of your output … | |
Re: Try this link: [URL="http://www.dotnetblogger.info/center-form-run-time-net/"]http://www.dotnetblogger.info/center-form-run-time-net/[/URL] | |
Re: You really want to try to develop a query for your data. Searching serially through a database defeats the purpose of using a database in the first place. See this post: [URL="http://vbcity.com/forums/t/112704.aspx"]http://vbcity.com/forums/t/112704.aspx[/URL] to see how to set up C# code to query an Access database. You can either use a … | |
Re: Depending on the complexity of the task, I can think of 2 ways off the top of my head: 1) Write a C# process that does your check and updates the required tables (most likely a Windows Console application). Set it up to run on your server as a Windows … | |
Re: The ListView supports the "DragLeave" event. Would this help? Once the event fires, you can check to see what's being dragged and if its an item from the ListView, you can remove it. | |
Re: You can search through the items in a ListView, by iterating through the "Items" collection. Further, each item has a SubItems collection. So, with code like this, you can look for an item in a ListView and do something with it. In this case, I have a ListView called "lvBatters" … | |
Re: Your problem seems to be twofold, but related to the same thing: Both solutions are named the same thing. When I pulled them down, it renamed the folder for one of them (the DLL project) to "PermutationGenerator.1". However, when I looked in the "References" item for the main project, you … | |
Re: First, that semicolon on line 8 (between the end of your method implementation and the curly brace) is going to be a problem.... "blabla.date" is "const char *". So, one of 2 things: either cast the return value as (char *), so it will match the method prototype: [CODE]return (char … | |
Re: Scott, Well, it depends what you want to do with the file after you're done.... however, once you write a PNG file to the back of a TXT file, it's really not a TXT file anymore. You could write out your data as binary, then tack the PNG onto the … | |
Re: Nonsense! Forms are your friend! Here's how you can get it to work, provided, that Form2 acts as a dialog - that is, you display Form2 wait for the user to exit the box, then close Form2 and collect the information from now hidden form. In Form1 (in the button1_Click … | |
Re: When you call "displayPlayerInfo", you are not referencing the array "players" that was created in main. You reference "pInfo", a new and uninitialized array of PlayerInfo structures. Pass the "players" array into the "displayPlayerInfo" and change the loop to use that, and you should be all set. | |
Re: Have you seen this post: [URL="http://code.activestate.com/lists/perl-win32-admin/6938/"]http://code.activestate.com/lists/perl-win32-admin/6938/[/URL] | |
Re: Other than the details you gave in your post (so I don't know the *real* complexity of your app, or your budgetary constraints), might I suggest that you actually convert the data for your app to use a database? That is (and again, I'm not privy to the reasons why … | |
Re: You do have the word "double" in your regex string twice (once near the beginning and once near the end). But that doesn't fix the issue. Modify your token string to look like: [CODE]string tokens = "\\s(auto|int|struct|break|else|long|switch|case|enum|register|typedef|char|extern|return|union|const|float|short|unsigned|continue|for|signed|void|default|goto|sizeof|volatile|do|double|if|static|while)\\s";[/CODE] This will cause it to make sure each token is preceded and followed … | |
Re: Current screen size/resolution. You will need some more code to check the display driver capabilities. Check this out: [URL="http://www.news2news.com/vfp/?example=374&ver=vcs"]http://www.news2news.com/vfp/?example=374&ver=vcs[/URL] | |
| |
Re: You may want to try the MaskedTextBox. It allows you to specify a mask to use in the control. Also, this will be smoother for handling things like editing in the control (backspaces, user clicking in the middle of the text and making changes, etc.) To set the mask, do … | |
Re: Have you tried setting the "DataSource" property of the DataGridView to null? [CODE]tblAllEntries.DataSource = null;[/CODE] | |
Re: Lots of great examples here: [URL="http://stackoverflow.com/questions/236129/how-to-split-a-string"]http://stackoverflow.com/questions/236129/how-to-split-a-string[/URL] Good luck! | |
Re: Try this link: [URL="http://www.switchonthecode.com/tutorials/csharp-tutorial-binding-a-datagridview-to-a-database"]http://www.switchonthecode.com/tutorials/csharp-tutorial-binding-a-datagridview-to-a-database[/URL] Looks to be a good example of exactly what you need. | |
Re: Use the "CompareTo()" method of the string class. It compares two strings and returns an integer, thusly: [CODE]int iCmp = Text[i].CompareTo(Text[i+1]); if (iCmp < 0) { // Text[i] is "less than" Text[i+1] } else if (iCmp > 0) { // Text[i] is "greater than" Text[i+1]; } else { // Strings … | |
Re: Look at line 33 - is this the correct way to call a function? See line 24 for a good example... But you have a second problem. Look at where "firstNum" and "secondNum" are declared (in the function "displayMessage"). These will not be visible in your main() function. You either … | |
Re: Looks like someone over at "social.answers.microsoft.com" is already answering this.... But, to be complete, I pasted the code into a new VS2008 project and ran it on my 64-bit Windows 7 installation, and it ran just fine. On a subsequent run, I deliberately messed up the machine name but in … | |
Re: This is going to sound like I'm being an a**, but I don't mean to be... sometimes it helps to just put stuff down on paper and visualize it. Write 2 columns of ascending (sorted) numbers on the paper (you can use 10 values, but less will suffice for illustration). … | |
Re: It looks like you may be off a node when you issue the delete. Here's a console app that will do what you want - you can adapt the code as you see fit: [CODE]using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Xml; namespace XMLDelete { class Program { … | |
Re: The only potential issue I see is that if you call "addnode" twice. The method does not check to see if "start" is pointing at anything. If called a second time, you will lose the context to the node that was established in the first call. You can really just … | |
Re: Is the data coming in to you sorted? Or, can you sort it? If so, then you can use standard break totaling. That is, you have "holder" variables for the vendor and the budget period. Then you process each row of your set, totaling up the values for your financial … | |
Re: On line 58 of your server.cpp, you are hanging on the "accept" call. That is, first time through, you accept the connection from your first client. It's running through your loop below, but there's no data, so it goes back to the top and hits the "accept" again, waiting for … | |
Re: You could try this: [URL="http://axiom3d.net/wiki/index.php/Main_Page"]http://axiom3d.net/wiki/index.php/Main_Page[/URL] or here is an (older) tutorial that uses the TrueVision 3D library: [URL="http://www.codeguru.com/csharp/.net/net_general/graphics/article.php/c11375/Creating-an-Interactive-3D-World-in-CNET.htm"]http://www.codeguru.com/csharp/.net/net_general/graphics/article.php/c11375/Creating-an-Interactive-3D-World-in-CNET.htm[/URL] Good luck! | |
Re: You will have to handle the "Draw" event for the tooltip and render it yourself. See the link below for the code: [URL="http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/19994c9f-bdaa-4c4c-bcb4-5c60cb241134"]http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/19994c9f-bdaa-4c4c-bcb4-5c60cb241134[/URL] | |
Re: If I understand correctly, rather than having the user press a button to bring up the page in the WebBrowser control, you could put "webbrowser1.navigate" statement into the "Form_Load" method of the form. Just double-click in a blank area of the form and the code window will appear, with the … | |
Re: Have you hand-run your SQL statement to see what results it produces? It appears to me that the statement will only return a single column. However, in your statements after the "reader2.Read()", you are accessing multiple columns. If there's only one column in the result set, that code will definitely … | |
Re: If it's a Windows Forms app, yes, you can use the Timer object and set the "Interval" property to the desired value, in milliseconds, then call the "Start()" method to start the timer. It will fire the "Tick" method when the interval is reached. From there, you can call any … | |
Re: [QUOTE]can i transfer the data in text file to sql to be in table format not as a whole textfile.[/QUOTE] That depends on how you need to access the data afterward. You could shove the entire text blob into a database table as one column, or, if you've split out … | |
Re: The .NET Framework, in conjunction with Visual Studio has a facility to generate a proxy class for a WSDL-based SOAP web service. First, can you reference the WSDL of the service? You should be able to get to it with HTTP syntax like: [icode]http://www.somesite.com/someservice?WSDL[/icode] That will differ from site to … | |
Re: You could use the "Startup" folder for a user. Be aware that folder will be at different locations based on the OS being used (XP, Vista, Windows 7, etc.) However, even though your scripts are written in C#, you may get more answers if you post this in the "Microsoft … | |
Re: First, does the IDE tell you what line you're getting the NULL reference exception on? Not sure how you want this to work, but when you check the XML node in your first "if" statement - if it's true (that is, the node is NOT null), you do this: [CODE]c … |
The End.