1,443 Posted Topics
Re: Writing a game will result in a list of projects. Building libraries that work together is equivalent to a list of projects. Even is you're writing console apps, you can write something that controls your particular style of output and save that in a library and something else that normalizes … | |
Re: [url]http://groups.google.com/group/programming-puzzles/browse_thread/thread/f239408149871517?pli=1[/url] | |
Re: Can you send to 100 at a time and just send multiple mails? Can you have the admin create 1 or more PDLs to minimize babe conversions? Is there more than one SMTP server that can share the load? | |
Re: If you use the .Equals() method, does it give the same error? | |
Re: Does the compiler give you an error? If so, can you paste it here? | |
Re: Is totalPayable a varchar or some numeric type? | |
Re: What is the value of queryy before that first += ? Should that just be = ...on the first one? | |
Re: I, personally, don't know... ...but I did [URL="http://www.daniweb.com/software-development/cpp/threads/154965"]find this[/URL]. | |
Re: You could possibly make a function that converts DBNull to an empty string like: [CODE] Function SafeValue(ByVal objOrig As Object) As String If (IsDBNull(objOrig)) Then Return "" End If Return objOrig.ToString() End Function [/CODE] ... then wrap all of your potential DBNull returned strings in that. | |
Re: You can return it as a string and then print the string outside of the method/class... | |
Re: The drive letter will always need to come first IF your intention is to write it to a mapped drive. Is the IP address part supposed to be a directory or part of the file name? ...or something else? | |
Re: Hi, vinoit. Welcome to DaniWeb. For your question, you will need to start a new thread. On the [URL="http://www.daniweb.com/software-development/csharp/61"]main forum page[/URL] near the bottom, there is a large button that says "Start New Thread". | |
Re: If you attempt to return "matrix" without the *, what error does the compiler give? Adjust your code to resolve that error message. You might need to make that matrix "static", however. :) | |
Re: A question I have (as Momerath implied): Would a "rotate" be counted as a "shift"? Also, does it matter if you re-draw or re-create the matrix when a shift occurs? | |
Re: Are you talking about [URL="http://www.codeproject.com/Articles/14746/Multithreading-Tutorial"]multi-threading[/URL]? | |
Re: What you're describing can be easy depending on your background in any programming language. Do you know about System.IO.Directory.GetFiles()? You can use that inside your Form_Load() to get the names of the files in a directory. You'll need to split the path off of the names for the content you … | |
Re: Someone on DaniWeb implied that you can use Dev-cpp to compile dot net code, but as Ancient Dragon mentioned, you won't find a better IDE for dot net than VS. Now, you should be aware there is no IntelliSense for C++ in VS2010, but it does exist for other languages. … | |
Re: Try using a List<T> of the control. | |
Re: You could use either a regular for loop or a foreach. If you use a foreach, you would need to increment your own counter; negating some of the benefit. | |
Re: I'm a little confused. Before any more code is written, you should solidify your design. Is the alphabet supposed to be at the top of the screen? ...or is the program going to cascade-down any character that is pressed? How does the user win the game? ...AND, you're intending on … | |
Re: Part of that depends on the OS on the remote machine and also the security settings. If the remote server is running an FTP server, it would help. Otherwise, you could attempt to set a location on the remote machine as a network drive and write to it like just … | |
Re: ...pretty-much the same thing: [CODE] using System; using System.Collections.Generic; namespace DW_412697_CS_CON { class Program { static void Main(string[] args) { TimeSpan ts = new TimeSpan(); new List<string>{"01:11:00", "00:10:00", "01:56:00"} .ForEach(s => ts += TimeSpan.Parse(s)); Console.WriteLine(ts.ToString()); } } } [/CODE] | |
Re: Sometimes we create complex objects that need special handling when we do things like add them together (or subtract). [url]http://en.wikipedia.org/wiki/Operator_overloading[/url] Let's say you have a class that has a description and a percentage. You could add object+object+object (etc.) but you might want to ensure the value never goes above 100%. … | |
Re: [URL="http://developer.qt.nokia.com/doc/qt-4.8/qtextstream.html"]Documentation[/URL] says it better than I could. You can click on the hyperlinks to get directly to each explanation. | |
Re: Did you put the second example in a small program and run it? | |
Re: If you have your data in some type of structure -- 2d array, list of objects, etc, you can loop horizontally and vertically through the data until you find what you want. The technique will partly depend on how much data you can pull back at one time and if … | |
Re: You could do something nasty like this: [CODE] using System; namespace DW_412456_CS_CON { class Program { public static string GetAssumedDate(string strBirthDate) { int intBirthYear = int.Parse(strBirthDate.Substring(0, 2)); int intBirthMonth = int.Parse(strBirthDate.Substring(2, 2)); int intBirthDay = int.Parse(strBirthDate.Substring(4, 2)); string strNowYear = DateTime.Now.Year.ToString(); int intNowCentury = int.Parse(strNowYear.Substring(0, 2)); int intNowDecade = int.Parse(strNowYear.Substring(2, … | |
Re: Try this: [CODE] $line = "Hello how are you"; while($line =~ m/\b(h\w+)/ig){ print $&."\n"; } [/CODE] | |
Re: It can probably be done with a lot of macro manipulation, but at some point a different language altogether would be of greater benefit. It sounds like you're interested in the concept of a Domain Specific Language. Ruby has some language extensions for other languages you might be able to … | |
Re: In java, all you need to do is reference them from main. ...just like you would reference almost any other class. ...unless they are buried in some other package. Are they in separate files? | |
Re: What is your GOAL? What do you want programming to [B]be[/B] for you? It will only be as important as you make it. Whatever is your #1 goal in life, you should be working toward that. Don't stress over it if something else becomes more important as long as it … | |
Re: Does it actually matter that SetVectors() is called or that the IRectangle has the expected (valid) values? | |
Re: Are you thinking of something like a tree or treeview or a menu with sub-menus? | |
Re: You are mixing two different SQL commands together -- both of which are incomplete. I imagine the pre-parser sees that you either need to supply parameters or complete the statement so it can determine what to send to the database. So, are you doing an insert or a select? | |
Re: If you don't have the host name, do you have an IP address? From the command-prompt, can you?: ping -a {that IP address} If you can, it might respond with the host name. | |
Re: Remove the word public from a couple of the classes. Put an =0 on a constructor. Use the same shape twice on two of your choices. | |
Re: This will invert the @Momerath list, but it's still functional: [CODE] using System; using System.Collections.Generic; using System.Linq; namespace DW_412157_CS_CON { class Program { static void Main(string[] args) { string strTest = "This, is, a, test, of, the, comma, splitting, thing, that," + "will, see, if, we, get, ten, or, not"; … | |
Re: Does the method change anything external to the method? If so, you can see if that changed or that it does not throw an exception... | |
Re: You will need to overwrite all of the data in the existing file with the new data + old data you want in it. You can do this by first creating a new file with the new data then append the old data to it, delete the old file, rename … | |
Re: You can use a List<double> to hold your values. ...or two List<double> | |
Re: The bottom part of your code cannot see those variables because they are enclosed in a different scope (inside different braces). | |
Re: Is the location of your database going to change? If not, I suggest using a different technique like registering your DB as an ODBC DataSource and connecting to it using a DataSource Name DSN. That way, the specific driver is already set for the given DB and you don't need … | |
Re: Yes, it is possible. It really depends on how you're using it. The easiest way is just to set it to NULL. | |
Re: Try UTF8 or some of the other encodings: [CODE] Dim arr_strData As String() = File.ReadAllLines("..\..\AnsiFile.txt", System.Text.Encoding.UTF8) [/CODE] | |
Re: How about this?: [CODE] using System.Linq; namespace DW_411760_CS_CON { class Program { static void Main(string[] args) { string s1 = "Ui"; string s2 = "uk"; string s3 = new string((s1 + s2).ToLower().Distinct().ToArray()); } } } [/CODE] | |
Re: Is it the same version of the DLL? It looks like that is a File Not Found error. Are there any problems with permissions for the current user to get to the file? | |
Re: Which concept is the problem? - Assigning the DateTime value to the cell? - Getting DateTime.Now as a value? | |
Re: I'm confused at how you're opening the text file BUT, here is how to use Substring to parse your fixed-format records. [CODE] Module Module1 Sub Main() Dim strData As String = "0300002158A2012010921343" ' sample data Dim strBarCode As String = strData.Substring(0, 10) Dim chrTerminal As Char = strData(10) Dim dtDate … |
The End.