179 Posted Topics
Re: 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; … | |
Re: Is item 5.14 on [url=http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q745q]this FAQ[/url] what you want? | |
Re: When I'm not on my computer I hang out with my friends, go shopping, or play games. | |
Re: [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 … | |
Re: 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 … | |
Re: 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. :) | |
Re: 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 … | |
Re: 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 … | |
Re: Why can't you use a sleep() kind function? | |
Re: [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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
| |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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. | |
Re: The only really good one I know of is dan appleman's... Can you find it used somewhere? | |
Re: Use the Thread.Sleep() method. [code] System.Threading.Thread.Sleep( 100 ) [/code] | |
Re: 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. | |
Re: I don't think violates anything, but why don't you pass the data by reference so that it isn't a problem anymore? | |
Re: 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] … | |
Re: [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 … | |
Re: 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. | |
Re: [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 … | |
Re: [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... | |
Re: 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 … | |
Re: 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. … | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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... | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: [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 … | |
Re: [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 … | |
| |
Re: 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. | |
Re: [QUOTE]how to concat two values without concat function????????[/QUOTE] That's totally not enough info. Can you elaborate a lot? | |
Re: 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 … | |
Re: 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 … | |
Re: I'm pretty sure you have to buy an MSDN subscription to get it offline. | |
Re: 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 … |
The End.