179 Posted Topics

Member Avatar for gaggu82

There might be a way in the STL to do it, but I don't know. I'd write a search function that finds every occurrence of "is" and then checks to see if the first and last letters are on a word boundary. [code=cplusplus] #include <string> #include <cctype> using namespace std; …

Member Avatar for Hamrick
0
165
Member Avatar for preetham.saroja

Is item 5.14 on [url=http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q745q]this FAQ[/url] what you want?

Member Avatar for Hamrick
0
125
Member Avatar for ProgrammersTalk

When I'm not on my computer I hang out with my friends, go shopping, or play games.

Member Avatar for EnderX
0
315
Member Avatar for mykurasa

[code=vb.net] Dim source As String = "CR499" Dim code As String = source.Substring( 0, 2 ) Dim value As Integer = Convert.ToInt32( source.Substring( 2 ) ) + 1 [/code] source has the original string, code has "CR", and value is an integer with the value of 500. Is that what …

Member Avatar for Hamrick
0
135
Member Avatar for jayz_raul

The datetime data type is what you want, and you can just ignore the date part by always making sure that it's always the same date. Then comparisons will rely on the time. [code] set @myTime = @myTime - dateadd( dd, 0, datediff( dd, 0, @myTime ) ) [/code] In …

Member Avatar for Hamrick
0
44
Member Avatar for meiyantao

I don't really know that much about AVL trees, but someone posted a link the other day to a site that has [url=http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_avl.aspx]this[/url]. It looks pretty easy to follow, so I hope that helps you. :)

Member Avatar for meiyantao
0
152
Member Avatar for mustoora

You can chain joins together and the next join works on the result of the last join. [code] SELECT * FROM thresholdTable INNER JOIN Configuration ON Configuration.Configuration = thresholdTable.Config INNER JOIN Consistency ON Consistency.Consistency = thresholdTable.Consistency; [/code] The intermediate table that you join Consistency to is the result of joining …

Member Avatar for QVeen72
0
1K
Member Avatar for shannonpaul

I think you're trying to use a switch to handle a range of values. That's not possible without one case for each value in the range. You should be using an if statement instead. [code=cplusplus] //calculate commission if ( sales <= 100000.0 ) { commission = sales * COMM_RATE1; cout …

Member Avatar for vijayan121
0
128
Member Avatar for AquilesBailo
Member Avatar for asilter

[QUOTE]what i want to be sure is, after function statements does the allocation space dissapear?[/QUOTE] No, it doesn't. But you _do_ lose the only reference to the space you had, and that's called a memory leak because now it's allocated and won't be freed until the program ends. If your …

Member Avatar for Hamrick
0
127
Member Avatar for Nevarc

I don't think you can change ReadLine to do that. You can use Peek, Read, and a StringBuilder though. [code=c#] Dim buffer As New StringBuilder Do While sr.Peek() <> 0 buffer.Append( Convert.ToChar( sr.Read() ) ) Loop [/code]

Member Avatar for Nevarc
0
77
Member Avatar for Agita

I just finished an app that lets you open a data connection and test stored procedures by using an XML config file to specify the stored procedures and corresponding parameter information. If I understand, that's close to what you want to do. There are a few things you need to …

Member Avatar for Agita
0
174
Member Avatar for Ainur

Comparing letters depends on the relative value of the letters. But for character sets like ascii you say that A > Z, a > z, and Z > a. I'll attach a little program that can compare strings and tell you how they relate. I added the visual studio project …

Member Avatar for Ainur
0
121
Member Avatar for eway2vicky

I hate just giving links instead of a meaty post, but you can learn more from these two than you ever could from me. :) [url]http://msdn2.microsoft.com/En-US/library/ms973802.aspx[/url] [url]http://www.codeproject.com/dotnet/cominterop.asp[/url]

Member Avatar for Hamrick
0
80
Member Avatar for Firestone
Member Avatar for bcm
Member Avatar for gaurav252

[QUOTE]But turbo C..compiler shows the value oj j in ...[/QUOTE] It doesn't matter what the compiler does. The expression is undefined so the compiler is free to do anything, like give you 0 as the result regardless of j's value, or throw a system exception, or evaluate the expression in …

Member Avatar for Ancient Dragon
0
206
Member Avatar for Kshiteesh

You can use the ToString() method of the value and it will turn DBNull into an empty string. [code=visualbasic] T7.Text = tmp.Fields("Street").Value.ToString() [/code] Or you can test for DBNull and just not set the text property if it's true. [code=visualbasic] If tmp.Fields("Street").Value <> DBNull.Value Then T7.Text = tmp.Fields("Street").Value End If …

Member Avatar for Kshiteesh
0
581
Member Avatar for php111

K&R is a book, The C Programming Language. If the tutorial is any good it won't matter what compiler you have, but I recommend visual C++ express because it's free and easy to use once you blank out all of the features you don't need. :) I don't know how …

Member Avatar for Ancient Dragon
0
125
Member Avatar for JaedenRuiner

[QUOTE]1. How do i make an untyped array on the fly?[/QUOTE] I'd use an ArrayList... [QUOTE]2. Why is Dim X()() different from Dim X(,).[/QUOTE] One is a a matrix and the other is a ragged array. In a matrix the size of the columns is the same for every row …

Member Avatar for waynespangler
0
166
Member Avatar for toko

Not really. You can disassemble the exe into assembly and then maybe find a program that converts the assembly to C++, but it's not going to be a good result even though you can edit it.

Member Avatar for SpS
0
94
Member Avatar for surfer_del
Member Avatar for Hamrick
0
40
Member Avatar for blondie.simon

Use the Thread.Sleep() method. [code] System.Threading.Thread.Sleep( 100 ) [/code]

Member Avatar for blondie.simon
0
98
Member Avatar for revenge2

The best insider tip I can think of is don't trust everything you read. Keep an open mind because what you learn could be wrong and you have to re-learn it from another source.

Member Avatar for toko
0
93
Member Avatar for sammy_raul

I don't think violates anything, but why don't you pass the data by reference so that it isn't a problem anymore?

Member Avatar for Hamrick
0
80
Member Avatar for Baskar_engg

There's no optional keyword in C#, all method parameters are required unless you use variable parameters with the params keyword. A finalize method in VB.NET is a destructor in C#. A destructor has the same name as the constructor--the name of the class--except it's prefixed with a ~ symbol. [code=csharp] …

Member Avatar for Hamrick
0
86
Member Avatar for gretschduojet1

[QUOTE]I don't want you to do my homework, I want you to point me in the right direction.[/QUOTE] Ok, here are a few hints that you can bring together to do the program. 1: You can find the right side (least significant) digit for a number in any base by …

Member Avatar for gretschduojet1
0
1K
Member Avatar for NycNessyness

In the [url=http://en.wikipedia.org/wiki/Ctype.h]ctype.h[/url] header you can find tolower, toupper, islower, and isupper for working with lower and upper case letters.

Member Avatar for Aia
0
464
Member Avatar for ndeniche

[QUOTE]but i don't know how to create the text file from my program...[/QUOTE] If you open a file for reading, C++ assumes the file exists. If you open it for writing, the file is created if it doesn't exist. If your open mode contains ios::out or ios::app then it's opened …

Member Avatar for Hamrick
0
132
Member Avatar for mauro21pl

[QUOTE][INLINECODE]NodePtr q;[/INLINECODE][/QUOTE] That's the wrong type. I think you meant to declare an object of Q instead of a NodePtr...

Member Avatar for Hamrick
0
97
Member Avatar for ajaytee

A database just makes sure the data persists between runs of the program. If you set up all of your assets and then close the program, the assets are stored somewhere on your hard drive so that when you run the program again, everything is still the same as when …

Member Avatar for Hamrick
0
90
Member Avatar for AdventChildren0

Instead of dividing by 2, divide by 8 or 16. That gives you octal and hexadecimal digits, respectively. The most obvious way to get the string is to build it in reverse by chopping off the least significant digit and using it to index an array of suitable translated digits. …

Member Avatar for Bench
0
106
Member Avatar for shaqnolysis

[QUOTE]am not that sure if its correct....[/QUOTE] Lack of confidence in your algorithm is a serious flaw and you should make sure that it's correct. Do a quick test in your head with all permutations of three numbers. {1,2,3} s = 1 1 is not greater than 2 3 is …

Member Avatar for shaqnolysis
0
103
Member Avatar for ssharish2005

This is a tricky one. The two arrays are incompatible because of the const just like you noticed. The first dimension of an array turns into a pointer so [INLINECODE]int arr[][3][/INLINECODE] becomes [INLINECODE]int (*)[3][/INLINECODE]. But a pointer to an array of int isn't convertible to a pointer to an array …

Member Avatar for Hamrick
0
106
Member Avatar for ADY!
Re: Help

What kind of player do you want to make? I'd start by going to sourceforge or freshmeat and looking for something close to what I want so that I can study the code. Looking at existing projects is a great exercise for getting new ideas and making sure you really …

Member Avatar for Hamrick
0
102
Member Avatar for mini_3110

Can you use System.Diagnostics.Process.Start? I'm not really sure how tcl programs are run because they're interpreted, but I'm guessing it works like perl programs and the interpreter is automatically started when you try to execute the script.

Member Avatar for Hamrick
0
118
Member Avatar for 1qaz2wsx7

The express editions don't support any kind of deployment except for ClickOnce. In regular visual studio you'd make a setup and deployment project...

Member Avatar for Hamrick
1
144
Member Avatar for amishosh

I don't think you can build just an open file. But you can make a dummy project and get the same effect by removing the source files in the project and adding existing items instead of new items to it each time.

Member Avatar for Tight_Coder_Ex
0
78
Member Avatar for jscriptanit

Do you mean programmatically pushing data to the text box while the window is minimized or somehow taking user input while the window is minimized? Programmatically isn't a problem as long as you have a timer or an event that fires while the window is minimized. I can't think of …

Member Avatar for Hamrick
0
80
Member Avatar for brijendramishra

To traverse a binary tree you have to touch every node in the tree once. From that you infer that the time complexity is [TEX]O(n)[/TEX]. You can take it further by postulating that because the recursive algorithm actually visits every internal node 2 times** to complete the traversal the time …

Member Avatar for Rashakil Fol
0
119
Member Avatar for Dani

[QUOTE]will our present rep recieved from the coffee house be eliminated?[/QUOTE] Yes, if I read this part right. [QUOTE]This will be a retroactive change. In other words, all members' rep power will be recalculated to not include the reputation points gained or lost in the Coffee House. The recalculation will …

Member Avatar for Dani
1
989
Member Avatar for quintoncoert

[QUOTE]For example if I have a program called program.exe and it is stored on the hard-drive is it possible to start the execution of that program by pressing a sequence of keys on the keyboard instead of going onto the hard-drive with windows explorer for instance and double-clicking with the …

Member Avatar for quintoncoert
0
191
Member Avatar for khalidxa

[QUOTE]I want it to return the value for the array.[/QUOTE] Why? The only thing I can think of is that you want a copy of the array instead of something that changes the array owned by the testCase class. If that's the case, you should still return the address of …

Member Avatar for Salem
0
174
Member Avatar for GenS
Member Avatar for 1qaz2wsx7

If you have a main form that makes subforms, you should be using an MDI application design. That fixes both of the problems right out of the box.

Member Avatar for Hamrick
0
207
Member Avatar for suneel kar
Re: help

[QUOTE]how to concat two values without concat function????????[/QUOTE] That's totally not enough info. Can you elaborate a lot?

Member Avatar for Ancient Dragon
0
88
Member Avatar for patsfan4878

Just don't compare the two variables if one is a space or punctuation. [code=c] while ( i < j ) { if ( isvalid( string, i ) && isvalid( string, j ) ) ) { if ( string[i++] != string[j++] ) { printf( "Not a palindrome\n" ); break; } }else …

Member Avatar for Hamrick
0
79
Member Avatar for KareemErgawy

I don't think a program can do that except for the simplest and most obvious of bugs; the kind that compilers or semantic checkers already catch for you 100% of the time. Finding anything more complex with any certainty needs a human brain behind the wheel. ;) You can try …

Member Avatar for quintoncoert
0
260
Member Avatar for mahvish
Re: msdn

I'm pretty sure you have to buy an MSDN subscription to get it offline.

Member Avatar for Hamrick
0
91
Member Avatar for fraogongi

How are you deploying the assembly? You didn't mention gacutil.exe in your steps so unless the assembly is in the same folder as the calling application (like vb6.exe) then it won't be able to find it because the path to the assembly isn't registered in the GAC. Try copying the …

Member Avatar for Hamrick
0
316

The End.