1,443 Posted Topics

Member Avatar for bigzos
Member Avatar for poojavb
0
135
Member Avatar for king03

Do you have Square defined somewhere else in the same namespace? ...like in one of your other .cs files?

Member Avatar for lxXTaCoXxl
0
149
Member Avatar for jonnyboy12

@jonnyboy12: Where is newAp defined in the class? @rubberman: Things change. Have you seen MFC? I coded in that for YEARS.

Member Avatar for thines01
0
144
Member Avatar for kiyu2keith

Put the numbers into one string. Use a substring to determine the offset and the length of what you're printing. Loop 4 times.

Member Avatar for kiyu2keith
0
567
Member Avatar for lxXTaCoXxl

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.

Member Avatar for lxXTaCoXxl
0
146
Member Avatar for ZER09

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 …

Member Avatar for thines01
0
529
Member Avatar for eng_m

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)?

Member Avatar for thines01
0
112
Member Avatar for honeybee2090

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(), …

Member Avatar for thines01
0
417
Member Avatar for triumphost

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()

Member Avatar for triumphost
0
186
Member Avatar for oskole
Member Avatar for thines01
0
159
Member Avatar for yongj

Your code is calling ExecuteReader. That's not what you're trying to do ("reader"). You need ExecuteNonQuery()

Member Avatar for thines01
0
795
Member Avatar for meme meme
Member Avatar for paradise11
0
173
Member Avatar for nthabiJacq

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 :)

Member Avatar for lxXTaCoXxl
0
228
Member Avatar for buster2209

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(); …

Member Avatar for thines01
0
192
Member Avatar for ariez88

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.

Member Avatar for thines01
0
167
Member Avatar for valestrom
Member Avatar for infinitus

Have you stepped through this in the debugger to see if the individual variables are being set?

Member Avatar for muze
0
201
Member Avatar for shifat96
Member Avatar for CEOEngineerSoft
Member Avatar for VicGirl
Member Avatar for jpunkins

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, …

Member Avatar for MandrewP
0
149
Member Avatar for king03

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 …

Member Avatar for thines01
0
225
Member Avatar for bhagawatshinde
Member Avatar for selfuser

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)

Member Avatar for selfuser
0
51
Member Avatar for c#_fem

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 …

Member Avatar for c#_fem
0
511
Member Avatar for nicewave

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; }

Member Avatar for thines01
0
187
Member Avatar for king03

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 …

Member Avatar for thines01
0
118
Member Avatar for SAM2012

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" …

Member Avatar for SAM2012
0
428
Member Avatar for zachattack05

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 …

Member Avatar for zachattack05
0
116
Member Avatar for haris riaz

I would start commenting out lines until the assertion failure stops. Should the position be set before the range is declared?

Member Avatar for ashishchoure
0
279
Member Avatar for kiail

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.

Member Avatar for kiail
0
162
Member Avatar for abc_defgh
Member Avatar for thines01
0
82
Member Avatar for jamshi213
Member Avatar for selfuser

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.

Member Avatar for thines01
0
340
Member Avatar for Hydrokr0n1k

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);

Member Avatar for thines01
0
164
Member Avatar for riahc3
Member Avatar for zhouy

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 …

Member Avatar for zhouy
0
248
Member Avatar for Andy90

That's VERY subjective depending on the type of application. What needs to be tested?

Member Avatar for thines01
0
87
Member Avatar for Pamilerin
Member Avatar for Gus_19

There are plenty of examples on this site and on the web. What, specifically, is giving you trouble?

Member Avatar for Begginnerdev
0
208
Member Avatar for spowel4

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[]>

Member Avatar for thines01
0
189
Member Avatar for honeybee2090

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 …

Member Avatar for thines01
0
127
Member Avatar for saneeha.nust

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 …

Member Avatar for thines01
0
96
Member Avatar for ct_hunny
Member Avatar for Wolxhound90
Member Avatar for Wolxhound90
0
133
Member Avatar for Om Alooi
Member Avatar for koricha

Does isnum actually hold a valid value? Does the problem happen before 18 and is just exposed there?

Member Avatar for thines01
0
189
Member Avatar for hussain shabbir

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. …

Member Avatar for thines01
0
82
Member Avatar for T0pAz
Member Avatar for riahc3

The System.Xml.Linq namespace is the easiest to use (in my opinion). What changes are you expecting to make in different locales/countries?

Member Avatar for skatamatic
0
744

The End.