3,183 Posted Topics
Re: I rather like NetBeans, from the selection of free tools. | |
Re: > So I was just wondering, when would you feel that you're at a point where you would say that "you know this language"? When I'm competent enough to write non-trivial programs in the language. For example, if you're only a few steps from the hello world program you're technically … | |
Re: > Why are you so angry I'm just trying to help?? No, you're not. You clearly said you can't help, so how could your post possibly be construed as "trying to help"? Your link is totally irrelevant to the question about topological sorting. Given that your post is both off … | |
Re: Step 1, check the documentation: http://msdn.microsoft.com/en-us/library/system.windows.forms.keypresseventargs.aspx | |
Re: > What web browser? All that were tried: IE10 and Chrome. > Does the problem happen when submitting any DaniWeb form, including trying to search I didn't try. Sadly, the hard drive that I bought to house Windows 8 died last night... > Does the problem happen on other CodeIgniter-based … ![]() | |
Re: That does seem to be a browser conformance issue. It doesn't occur in IE9 or 10. I'm a bit torn between saying that a website should attempt to cover the broadest range of browsers possible, and saying that if you're still using IE8 or older you should upgrade as quickly … | |
Re: > AFAIK "rank" cannot be bought. It must be earned. *Default* rank. That is, any of the default ranks when you don't have a custom title will be some combination of post count, reputation points, and account age. Permissions for a custom title *can* be bought by donating, if I … | |
Re: > **WHY THAT HAPPENED? plese answer ** The post in question matched a pattern of spammers wherein they'll post something completely valueless to an old thread along the lines of "thanks for posting" or "that was very useful, thanks", as a means to spam their signature. We delete those as … | |
Re: What is line 24 supposed to accomplish? Keep in mind that `connector->next` is uninitialized at this point. | |
Re: I'd like to think that the more experience one gains with reading and writing code, the less these little details matter. A modicum of common sense in the coding style and overall consistency is what matters. This attitude is especially important if you plan to step into the professional world, … | |
Re: > It's supposed that the sentence between the two quotation marks will not be targeted directly to the screen, but will be stored somewhere first before directed to the screen. I'm guessing you mean the buffering mechanism. For performance reasons, because you don't want to communicate with devices (a typically … | |
Re: > I live in the north metro area of Atlanta. The [.NET users group](http://www.atldotnet.org/default.aspx) meets at the Microsoft offices in Alpharetta. If nothing else it's a good way to network with other developers and ask about targeted courses. I wish I could say I'd see you there, but I'm too … | |
Re: The MouseMove event needs to take the current state of drag into account: Private Sub PictureBox1_MouseMove() Handles PictureBox1.MouseMove If drag Then Me.Top = Windows.Forms.Cursor.Position.Y - mousey Me.Left = Windows.Forms.Cursor.Position.X - mousex End If End Sub | |
Re: > So how do I read only 10 line of input file. Create a variable that counts to 10: for (int i = 0; i < 10 && fgets(line_buffer, sizeof(line_buffer), infile); i++) { printf("%s\n", line_buffer); } | |
Re: Buy a book on HTML and work through it? Rinse and repeat for other "web programming" topics. | |
Re: > My question is how do you run a c file or c++ file in vs2012 with out creating a solution. Run the compiler from the command line. I'm not aware of any out of the box way to do it in the IDE, but you could create your own … | |
Re: The simplest approach would be fgets() and strtok(). Here's a quickie example: #include <stdio.h> #include <string.h> int main(void) { FILE *in = fopen("test.txt", "r"); if (in) { char line[BUFSIZ]; char *tok; int i = 0; while (fgets(line, sizeof line, in)) { line[strcspn(line, "\n")] = '\0'; /* Trim the newline if … | |
Re: > But why the break in the default is needed? `default` isn't special from a syntax standpoint, it's just another case. The reason a `break` is required is the same reason it's required in other cases, due to the fact that `default` isn't required to be the last case in … | |
Re: Just use the file name and not the full path in the query. The path without the filename would go in the connection string. Here's a working example you can use as a template if you'd like: Private Function CsvGenerateView(filename As String, hasHeader As Boolean) As DataSet Dim connectionString = … | |
Re: > I faced similar issue transferring CSV file into database, but after splitting the string using String.split() function the files are properly inserted into the table. Until you're given a complex CSV file where one or more fields contain embedded commas or line breaks. ;) The ReadLine() and Split() approach … | |
Re: > Athough I am specifying the braces for the && operator so that it gets executed first. It doesn't work that way. The logical operators are short circuiting, and they *always* execute left to right. Those two features together mean that the left side of your `||` statement will always … | |
Re: > which is better for a noob programmer ? netbeans or jcreator? While I agree with James as far as learning how things work under the hood first, it's not unreasonable to move quickly into an IDE once you get a handle on it. In that case I'd suggest JCreator … | |
Re: The problem with instant/realtime updates is that they can hammer the server, and it gets worse the more notifications you offer. Your example was Facebook, but I can guarantee that Facebook doesn't have the same server and database limitations that we do, and keeping the site responsive (not to mention … | |
Re: When does it pop up? What were you doing at the time? The only time I'm aware of that this should happen is when you create a new article. | |
Re: If either one were conclusively "the best", the other would have died long ago. Both ASP.NET and PHP are a good choice for your stated needs. If you want to do a proper comparison, you'll need to dig down to something far more specfic than "huge amount of users" or … | |
Re: > I don't know how to use it. Then this is a good time to learn how to use it. Believe it or not, most programmers don't know how to do everything required to complete a project when they start; they learn it as they go. | |
Re: That's an easy one because it's nothing more than a derivation of quadratic complexity. For example, if the number of dimensions, call it `m` is 2 then you have classic quadratic complexity: O(n^2). If `m` is 3 you have cubic complexity: O(n^3). Thus you generalize for any value of `m` … | |
Re: I'm not sure I understand the question. What do you mean by the "order" of the array? Do you mean how to traverse a 1D array of 3125 elements as if it were a 5D array of size 5 for each dimension? Or do you mean how a 5D array … | |
Re: > What is the most efficient way to read a bit at a particular position in a byte? Amazingly enough, it depends on the bit in question. A general approach to reading *any* bit neglects tricks for reading *specific* bits more concisely (ie. using fewer instructions), and thus "faster". | |
Re: You don't need an array to sum numbers that are coming in sequentially, but you *do* need to accept those numbers properly in turn and accumulate them in the sum: int sum = 0; for (int i = 0; i < 10; i++) { sum += Convert.ToInt32(Console.ReadLine()); } Console.WriteLine("Sum: {0}", … | |
Re: The "errors" you posted are part of the stack trace, not the actual error message. Can you post the entire thing? | |
Re: You're not really doing it at the same time. Think of the output as a sequence of rows, and each row as a sequence of characters where the blank space between items is literally whitespace. So for each 'x' in your example, print a space character. The pseudocode for the … | |
Re: I'd wager you haven't set NetBeans up correctly to [compile and run C programs](https://netbeans.org/community/releases/72/cpp-setup-instructions.html). | |
Re: I wouldn't put them on your resume, but if they're good examples of your ability I'd include them in a project portfolio for interviews. | |
Re: It's certainly frustrating when I'm working with a programmer who clearly has a weak fundamentals, but I don't think "modern" languages (whatever you choose to mean by that) are the only culprit, or even the most prominent culprit. More likely is this wonderful resource we have called the internet, and … | |
Re: > A flowchart is (or was - who the hell still uses flowcharts in the 21st century?) I use them often. A whiteboard and an informal flowchart are handy for wrapping your brain around complex algorithms. They're also *very* useful for business process and workflow because business types (and techie … | |
Re: That error typically pops up when your connection string is malformed or the machine doesn't have appropriate Jet drivers installed. | |
Re: > I think i have coded the program correctly but when I try to run it, it doesnt run... Can you be more specific about what happens when it "doesn't run"? Does the program not start at all? Does it ask you for a filename but then give an error? … | |
Re: You need to divide and modulo by 16 instead of 8, and you need to use the letters 'A' through 'F' when `x` is greater than 9. A fun trick is with a table lookup of digits: public static void convert(int a){ String digits = "0123456789ABCDEF"; String obrnuti = " … | |
Re: It's up to the browser, of course, but typically they're organized by domain. Put simply, a website's domain is know, so it's trivial to match the website with its cookies. | |
Re: You're trying to use the subscript operator on an empty vector. A vector is not an array, and you need to take care go make sure that there's enough room before indexing one. Consider something like this instead: void insertItem(int k, const ElemType& x){ A.push_back(Item(k, x)); } | |
Re: > i got the code from internet, but i wonder why is it not working. can somebody please help. Read the thread you posted to, then follow the advice. Your problem is not unique. | |
Re: > Under certain desktop layouts, typically tablets or rotatable displays, the Community button sits beneath the Hardware & Software button. So that, when a pointer hovers over the Hardware & Software button, the first few items on the dropdown menu is obscured by the Community button sitting below the Hardware … | |
Re: > how do you prefer your code ? I'm a code aestheticist, so beauty comes a close second to function. Typically I favor transparent code rather than comments because comments tend to make the code uglier unless you do it well. I like consistency (such as indentation and general code … | |
Re: > I had been away such a long time, i didn't ever notice when that option was added. It's always been there. ;) Under vBulletin the feature was called thread subscription in your control panel's options section, and under Daniweb's custom system it's automatically watching articles from your edit profile … | |
Re: Wouldn't it be simpler to defer that prefix algorithm to a separate function that returns a boolean? for (;;) { printf("Please key in the number of passenger >> "); if (scanf("%s", &mass_passenger_check) && starts_with(mass_passenger_check, isdigit, 3)) { break; } } Writing such a function is trivial: int starts_with(const char *s, … | |
Re: The most greivous error is that arrays in C++ are 0-based and you're treated yours as if it were 1-based. num[5] is *not* a valid index. Consider this: #include<iostream> using namespace std; int main() { int i,m,num[5]; cout<<"Enter Integer Values"; for(int a=0;a<5;a++) cin>>num[a]; for(int j=1;j<5;j++) { i=1; while(num[i]>num[j]) i=i+1; m=num[j]; … | |
Re: I've been programming in .NET professionally for almost a decade and I still think of [this](http://www.amazon.com/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844) when people say "CLR". :D | |
Re: strtok() doesn't respect CSV quoting rules, and as such it's the wrong solution to your problem. You need to actually parse the CSV format and break it down properly, which means either using a library or writing your own parser (not especially difficult, but not trivial either). | |
Re: > i am very glade to told you that you guys must learn java programing language because i think aproximate one billion devices are running java... Just because there are ~1 billion devices running Java, that doesn't mean I need to write code for them. Your statement is basically an … |
The End.