1,443 Posted Topics
Re: Can you use DateTime and TimeSpan? They've never failed me. | |
Re: Do you have Square defined somewhere else in the same namespace? ...like in one of your other .cs files? | |
Re: @jonnyboy12: Where is newAp defined in the class? @rubberman: Things change. Have you seen MFC? I coded in that for YEARS. | |
Re: Put the numbers into one string. Use a substring to determine the offset and the length of what you're printing. Loop 4 times. | |
Re: Dot net collections are good for unknown amounts of something (like a list). You can even make an extension method on the list to process the elements throught he functions. | |
Re: Why don't you put those parameter types in an array, List or Dictionary so you can have a more efficient search. You could also reorder them to look for the most common data type first. The structure containing the parameter data types would be at the module level (instead of … | |
Re: Have you seen the multitude of [Palindrome examples on this site](http://www.daniweb.com/search/query/palindrome/0?q=site%3A%2A%2F+palindrome)? | |
Re: You could do something like this (that works on this very posting): Imports System.Net Imports System.IO Imports System.Text.RegularExpressions Module Module1 Sub Main() Dim rxIpAndPort As New Regex("(?<ip_and_port>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d{1,5})") Dim wc As New WebClient Dim fileInFile As New StreamReader(wc.OpenRead("http://www.daniweb.com/software-development/vbnet/threads/422678/filter-textbox-text")) Dim arr_strData = fileInFile.ReadToEnd() _ .Split((Chr(10) + Chr(13) + "<> ") _ .ToCharArray(), … | |
Re: This class seems overly complicated. What is it supposed to do? One way to override the comparison operator is to do this: virtual bool Equals(Object^ obj) override { return this->ToString()->Equals(((CustomType^)obj)->ToString()); } It might be the only way. Two other overrides you will need will be that of GetHashCode() and ToString() | |
Re: Are you saying you want to split the URL so it will only show the domain? | |
Re: Your code is calling ExecuteReader. That's not what you're trying to do ("reader"). You need ExecuteNonQuery() | |
Re: What have you tried so far? Which part is not working? | |
Re: Do you really mean [perfect numbers](http://en.wikipedia.org/wiki/List_of_perfect_numbers)? If so, there are only three (3) between 1 and 1000. As @lxXTaCoXxl says, you probably mean [prime numbers](http://en.wikipedia.org/wiki/List_of_prime_numbers#The_first_500_prime_numbers) The formula you use for each will be completely different :) | |
Re: I would use the System.Xml.Linq namespace to reach the elements easier: using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; namespace DW_422750_CS_CON { class Program { static void Main(string[] args) { XDocument xd = XDocument.Load("../../XMLFile1.xml"); //Get just the price Console.WriteLine(xd.Descendants("Product").Elements("Price").First().Value); // Report on all of the elements List<XElement> lst_xe = xd.Descendants("Product").ToList(); … | |
Re: Is it a requirement for you to use a Jagged Array? If so, [check out this post](http://www.daniweb.com/software-development/csharp/threads/412294/input-in-jagged-array): Otherwise, @skatamatic is correct: there are many easier(and more powerful) things you can do. | |
Re: What compiler and OS are you using for the client? | |
Re: Have you stepped through this in the debugger to see if the individual variables are being set? | |
Re: Are you allowed to use substring() ? | |
Re: Is there a question? | |
Re: The problem is usually more in the head of the programmer. Once you can equate it to something, it becomes clear( er ). Think about how to describe to someone where you are sitting in a movie theater. If you are in third row back and the fifth seat over, … | |
Re: All of that depends on your level of experience. You're just going to need to pick something and do it. Console games can be easier to write, if you're not familiar with graphics rendering and animation. Given only one week, you need to pick something you're comfortable with or that … | |
| |
Re: Check out these two links: [BinaryFormatter Class](http://msdn.microsoft.com/en-us/library/system.runtime.serialization.formatters.binary.binaryformatter.aspx) [Saving and Reading Object to/from a Database](http://www.c-sharpcorner.com/UploadFile/lsangeun/SaveObjectsInDB12022005051647AM/SaveObjectsInDB.aspx) | |
Re: Are you talking about the [Windows System Registry](http://en.wikipedia.org/wiki/Windows_Registry)? If so, all you will need to do is have your programs use the already existing classes and methods to manipulate it. http://www.developerfusion.com/article/4640/registry-ins-and-outs-using-c/2/ http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.aspx Also, does this need to be WCF if the communication between the programs is to be through the … | |
Re: Would it be easer to see if the rtb contains the substring (the easy way), first? if (richTextBox1.Text.Contains(tbSearch.Text)) { richTextBox1.SelectionColor = color; richTextBox1.SelectionStart = richTextBox1.Text.IndexOf(tbSearch.Text, StringComparison.CurrentCultureIgnoreCase); richTextBox1.SelectionLength = tbSearch.Text.Length; } | |
Re: You could do something like [the dice game mentioned in this posting](http://www.daniweb.com/software-development/csharp/threads/421870/need-help-to-compare-outcomes-of-poker-dice-game). One part of the team could work on the dice engine, another could work on the game engine and another could work on the user interface. It could be done as a graphical representation, web app or from … | |
Re: Since you seem to be using C++/CLI (along with STL), I'm going to assume CLI is acceptable. The following example replaces your special characters with Regular Expression syntax. You can tweak the Replace parameters to be exactly what you want, but you can see what was done here: #include "stdafx.h" … | |
Re: Yes, just use single quote marks without the parse call. '+' You can also call ToCharArray() on a full string. private static char[] CharArray1 = { '+', '(', ')', '-', ' ' }; private static char[] CharArray2 = "+()- ".ToCharArray(); It looks like you're going to parse a phone number … | |
Re: I would start commenting out lines until the assertion failure stops. Should the position be set before the range is declared? | |
Re: Can you give us an example of the layout of the file? Basically, you split the incoming strings into numeric string segments and then call Integer.Parse() or Conver.ToInt16() on them. | |
Re: What are the other forms? Dictionaries and dot net are pretty flexible. | |
Re: What happens when it runs? Do you get an error message? | |
Re: It looks as if it is a visible representation of the *similarity* of the a suspected letter against other letters of the alphabet -- where the higher number represents a greater similarity. | |
Re: You would give your string a name: string strData = "this is neat"; When you call a function that needs to use a string, you would pass the name of the string. DoSomething(strData); | |
Re: You're calling conn.Open() twice. | |
Re: Try this: Imports System Imports System.Linq Module Module1 Sub Main() Dim Array1(4) As Double Array1(0) = 2.3 Array1(1) = 4.2 Array1(2) = 1.9 Array1(3) = 0.2 Array1(4) = 0.88 Dim Array2(4) As Double Array2(0) = 0.19 Array2(1) = 0.002 Array2(2) = 0.2 Array2(3) = 0.45 Array2(4) = 1.8 Dim Array3 … | |
Re: That's VERY subjective depending on the type of application. What needs to be tested? | |
Re: Is it not good enough to use user IDs or Portfolio IDs? | |
Re: There are plenty of examples on this site and on the web. What, specifically, is giving you trouble? | |
Re: You could, of course, fake it out by making it a List<List<string>> // calling the .Add() method on each inner list and return it as a List<string[]> | |
Re: How you extract the data will depend on how it is stored on the web page. The issue will be parsing the HTML. Do you have a sample page? Without knowing more, I would use a System.Net.WebClient and use the .OpenRead() feeding it to a StreamReader. That way, your page … | |
Re: One way to think about it is that you have 4 numbers -- therefore, you have four positions. Each number must appear in each position a certain number of times (6). If you write out all of the permutations with a text editor, you will see how they need to … | |
Re: What does the text file look like? ![]() | |
Re: What is the error and what happens when you step through this in the debugger? | |
Re: Does isnum actually hold a valid value? Does the problem happen before 18 and is just exposed there? | |
Re: After you visit the link given by @zeroliken, you can look around the web on sourceforge or codeproject and other sites that host projects to see other functioning code in C++. Also, there are plenty of books you can pick up that will have exercises and step-by-step instructions in them. … | |
| |
Re: The System.Xml.Linq namespace is the easiest to use (in my opinion). What changes are you expecting to make in different locales/countries? |
The End.