3,183 Posted Topics
Re: If you don't add any code to the event handler, simply resetting it in the control properties will delete the code as well. If you *do* add code (even if you delete it immediately), the best approach is to delete the handler manually and also reset it in the control … | |
Re: In your debugger, copy the contents of `sqledit` and run the query manually from your database. This makes it easier to spot check queries because it eliminates the obscuring of issues through VB.NET boilerplate. | |
Re: Please show some proof of effort as per Daniweb rules. Thank you. | |
Re: > I am a programmer. That's why I'm receiving a paycheck. I sit alone in a small cubicle and do my work. That's an interesting description of a programmer. I *wish* I could sit alone in my office and do my work without having to communicate with the rest of … ![]() | |
Re: > then why when I run program all I get is endless 0's ? Simple math says that many of the cells will contain 0 since x, y, or z will be 0, and 0 times anything results in 0. However, there's a bug in the code: for (int y … | |
Re: Pasting the contents of the header into your file would do it, assuming you use the same header that came with your compiler. But all in all, that would be silly since as Banfa said, that's what the headers are for. | |
Re: > I'm not sure what the other answers looked like, but division and modulo may not be the best way to print this stuff out, especially in C where prepending to a string is not trivial. It may be a good idea to look into actual bitwise math operations. It's … | |
Re: I have an idea, how about you do *something* first, then ask for help. Because it looks a lot like you're trying to cheat by having other people do your homework. | |
Re: Possible, yes. However, for clarity sake, I'd recommend following up your call to `fscanf` with `fgetc` and check the result for the character you want: while (fscanf(pFile, "%99s", nam) == 1) { int next = fgetc(pFile); if (next == ' ') { // Do something } else if (next == … | |
Re: > Sometimes the file is "word number" and other times it is just "word". That's actually very consistent. All you need to do is look for two potential line cases, which is easy: while (fgets(line, sizeof line, pFile) != NULL) { int items = sscanf(line, "%s %d", nam, &val); if … | |
Re: I'd create a class or structure for a course, then a class for a student that has a vector (or array if you so choose) of courses. Finally, I'd create a vector (or array if you so choose) of students and be good to go. class Course { ... }; … | |
Re: What's the value of `x`? Neither of the values in `notename` suggest a valid file name, and if they do, you'd need to verify that the file is in the current working folder. I'd suggest trying `perror` to get more information on *why* the file didn't open successfully: if (!readnote) … | |
Re: > Try to see it in limits.h It might be there, but if it is, it's a library extension unique to your compiler. | |
Re: > because the MSDN program still uses errror.h, and hendels the error in old fasion way! You mean `errno.h`? `_stat` and `FindFirstFile` are both C-based API functions, so errno and return codes are essentially the only option for handling errors. You can wrap your own exception handling mechanism around it … | |
Re: > As long as they do not begin with numbers. Is this standard functionality? Yes. > but then it is rather vague about what identifiers are, exactly. You might be reading the wrong section. Section 2.11 (C++ n3242) gives both a grammar and a detailed description of syntax. Section 6.4.2 … | |
Re: What does the server do? If all your clients need is database access then hitting a database on another machine is simple. If clients connect to a server that handles the heavy lifting, you'd need to look into something like WCF to manage the communication between them. Another thing to … | |
Re: [Here](http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048384015&id=1043284392) is something I wrote up years ago, but it should still be relevant to your needs. | |
Re: The date-time stamp on a post gives you a hard link to it that can then be pasted into another post. [For example](http://www.daniweb.com/community-center/daniweb-community-feedback/threads/471397/refer-to-a-particular-post#post2057253) | |
Re: Contact the ISO standards committee and submit a request to have your function added. Since that's not likely to happen, you'd be better off creating your own library that gets distributed with your program. ;) Can you provide more details on this function and how it will be used? I … | |
Re: "Expert" is a tricky word. I wouldn't expect anyone to be an expert in *one* of those, much less all of them. However, being competent in all of them or even proficient is certainly possible. Though Silverlight's lifetime is questionable. We're not sure if Microsoft will continue to expand and … | |
Re: You need to build up the number as digits are read, but not if non-digits are read. The trick is handling input so that you don't miss anything such as a number at the end of the file, which means *not* using a comparison against `EOF` as the loop condition: … | |
| |
Re: > I've noticed that when generating random numbers they repeat. It sounds like you want a random shuffle rather than a random selection. The former will give you a randomized ordering of the set such that there are no repeats until the set is exhausted: // Untested code var rand … | |
Re: So...Windows 8.1 with a proper start menu? Running Metro apps on the desktop seems interesting, but not really a make or break feature. Having the two IE versions talk to each other would be nice. Do these reliable sources have any other information? If not, I'm not seeing much of … | |
Re: A control can be a container for other controls, so such an algorithm should be recursive: Private Sub SetControls(ByVal Control As parentCtrl) If TypeOf parentCtrl Is Label Then ' Set the label properties you want End If For Each ctrl As Control In parentCtrl.Controls SetControls(ctrl) Next End Sub | |
Re: On the surface it seems enticing, but the concept of immortality (or extreme longevity in this case) is usually more about fear of death than anything. If you *really* think about it, living so long would be more of a curse than a blessing. I suspect most people who took … | |
Re: I'll also link you directly to [here](http://eternallyconfuzzled.com/jsw_home.aspx). A hashmap by definition is almost surely implemented using a [hash table](http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx), but mapping data structures also commonly use balanced binary search trees ([red black](http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_rbtree.aspx) being the most popular for this purpose). | |
Re: The debugger is called gdb. A quick Google search for "gdb tutorial" will get you started. | |
Re: Luckily for you, a lot of students try to cheat on these forums by posting their homework assignment. Just look through those to get ideas, but please don't post your solution for the cheaters to turn in. | |
Re: How exactly do you want the child anchored? Absolute position? Relative percent? | |
Re: Please do your own homework. We'll help you work through specific problems in your code or understanding of the question, but won't do the work for you. ![]() | |
Re: > `pointer= new T;` This allocates *one* instance of `T`. To create multiples, use the `new[]` syntax with your size: pointer = new T[size]; > `pointer++;` Very bad idea. You shouldn't modify the base pointer unless you're careful to roll it back at some point. This is because it can … | |
Re: > Your issue may be that std::cin >> name; does not remove the newline char from the resulting string. The `>>` operator is delimited by whitespace, so it would never store a newline unless you go out of your way to make it happen. The problem is more likely that … | |
Re: > Well if I think for just a second the size of int is possible to obtain by sizeof(int). True, but how do you know that the `sizeof(int)` bytes you read really represent an integer value? That works for binary files where the format is known, but for text files … | |
Re: Code highlighting doesn't run after a post is submitted. If you reload the page, your code will be displayed with highlighting. | |
Re: Sounds like a good place to use a map: vector<string> v = { "Jan2013", "Jan2013", "Jan2013", "Jan2014", "Jan2014", "Jan2014", "Jan2014", "Feb2014", "Feb2014" }; map<string, int> freq; // Loop through the vector for (auto x : v) { ++freq[*x]; } for (auto x : freq) { cout << "total count for … | |
Re: Currency. `{0:C}` says that the first argument after the format string is to be formatted with the standard currency formatter. | |
Re: You're trying to save a string into an image type, those two are incompatible. You need to extract a byte array of the image to pass to SQL. | |
Re: Over the years I've been leaning more toward \#2 because it's easier to manage. When all of the controls are directly inside your TabControl, they must have unique names regardless of whether they're on separate pages. | |
Re: That's an easy one, `TabPage` doesn't have an `Activated` event. :) The `Click` event is fired when the mouse clicks on the control. | |
Re: > ReDim Preserve marks(10) is important to be written here? Preserve retains existing values in the array, so if you want to keep the values of indexes 0 through 2, it's important. > ReDim marks(2) is important to be written in this way? Um...yes? | |
Re: Since you have free options of SQL Server, I see no reason to rely on Access databases. They're too restricted to be worth it most of the time. > p.s: i hope this was not against the rules "can i trust to Crd version of sql server 2012? Discussion of … | |
Re: 2014: The usual evening, an inconvenient day off, and now I have to remember to write 2014 instead of 2013. | |
Re: The default `find` uses relational operators overloaded by the contained type (`operator==` to be precise). If you don't have those, you can either add them or use `find_if` with a predicate that handles a custom comparison. | |
Re: Just the function or member function name won't do, the argument list is required even if it's empty. For example: obj2->Landline(); // Notice the parentheses Also note that you'll immediately get a runtime failure because `obj2` doesn't point to anything. Either make it a regular object: PCTL obj2; ... obj2.Landline(); … | |
Re: The thumbnails still take up contiguous memory. Usually when you get an out of memory exception in image processing, it's due to fragmentation. Have you considered using a window of the thumbnails rather than trying to display all of them? That way you have a manageable subset of bitmaps in … | |
Re: Just post under Software Development with a tag for Microsoft Dynamics AX. :) Dani wants to move toward more of a tag-based system anyway, so new categories are unlikely. | |
![]() | Re: [This article](http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx#traverse) may be helpful. It describes both recursive traversal and an iterator based design. > But I've no idea how to implement it in the program. You mean calling the function? Your first example should work, provided `fun` is defined and `t` is a pointer to `bst_char`. Another variation … |
Re: Put simply, the larger the character set used, the longer it takes to do a brute force crack of the password. If you just use letters, or even just lower case letters, your string would have to be longer to have the same security as if it used more varied … |
The End.