4,439 Posted Topics
This is easy! But I admit, it can be rather confusing at first if you also take the old style MenuItem stuff into account. I hope my code is as clear as possible. If not please let me know. To test it, just start a forms application and paste it … | |
Re: To print footers or headers on each printpage in Excel read this [article](https://support.office.com/en-us/article/Use-headers-and-footers-in-worksheet-printouts-78e14bc7-ad9b-4dd8-9d59-dd201046b8f7). How to use page breaks, you could read [this](http://www.excel-easy.com/examples/page-breaks.html) You specified vb.net if so, we like to see some code and were in the code it doesn't work. | |
Re: Have a look [here](http://referencesource.microsoft.com/#mscorlib/system/io/file.cs,1c7421e464f67b7e). And [here](https://msdn.microsoft.com/en-us/library/system.io.file%28v=vs.110%29.aspx). | |
Re: Let me start by telling I am sort of a C# affictionado, with intrests in other languages. I am as surprised as you are. Even more because you did extra calculations in the C#version to time the thing. Perhaps that's a problem. Try to use if possible the same class … | |
Re: Your first question: how do you spot logical errors? Answer: by testing. line 65:`while(user1age > 6 || user1age < 12)` Did you test that? Try `user1age = -123` what about `user1age = 9999` ? You will find out that any value will do here. Endlessly... Consider using the AND operator, … | |
Re: Hi, Hermelix welcome here at Daniweb! :) Der Danny von Belgien! Your main problem at frist glance, is a lack of curly braces. You can omit them if your if statement only has one line. If you have many lines you have to use them. I ALWAYS use them if … | |
Perhaps a bit of a strange question. What if I had designed a new quick, superquick sort and posted the code on DaniWeb first? Later I could make a scientific article out of my effort. Would I still be the owner? Or would it be Dani or DaniWeb? | |
Re: Hi Rammanan, welcome at daniweb. You got to intercept one of the key events( `KeyPress`, `KeyDown` or `KeyUp` )instead of the `Click` event. [Example](http://www.homeandlearn.co.uk/NET/nets10p3.html). | |
Re: Guess you could use the IsNothing function. Or something like `If MyDGV Is Nothing Then ...` | |
Re: As you don't exactly state the exact programming language you're working in, you will find on this [Rosetta site](http://rosettacode.org/wiki/Quaternion_type) some code for quaternions. | |
Re: Referring to your last post with code. Why are yoy defining an `int` as `G_master` (line 9) and a `clas`s as `G_master` (line 19)? | |
Re: I guess you got to some perform a `close`. See [this example](https://msdn.microsoft.com/en-us/library/windows/desktop/dd562692%28v=vs.85%29.aspx) Do not worry about the C++ markings. First code is in VB, second is in C#. | |
Re: Perhaps [this](https://www.daniweb.com/programming/software-development/threads/500285/c-encog-neural-net) can help you a bit. | |
After changing a few bits and clicking the update button I got a message : `date not in correct format` or something. So no change happend. Only date I had was birthday in dd/MM/yyyy format. | |
Re: Have a look at [this snippet](https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.fileio.textfieldparser.aspx) and [the tip from deceptikon](https://www.daniweb.com/programming/software-development/code/468063/how-to-read-lines-from-a-csv-file-) Converting strings to doubles can be done [this way](https://msdn.microsoft.com/en-us/library/zh1hkw6k%28v=vs.110%29.aspx) Happy reading! | |
Re: line 13 : what type is count[MAX]? It is also not a good idea to name a counter and an array with the same name. This can lead to confusion and unneeded errors. | |
Re: I once removed columns in a DGV by clicking in one of the cells of the column instead of in the header. So I could do something like this in the remove click handler: `this.InputDGV.Columns.RemoveAt(this.InputDGV.CurrentCell.ColumnIndex); ` | |
Re: Hi nugab welcome at Daniweb. Don't have any idea what you are talking about. It might help if you could send a picture of the sheet before and after. | |
Re: > In the real world there are a lot of half true things. What do you do with those? Try [fuzzy logic](https://en.wikipedia.org/wiki/Fuzzy_logic) | |
Re: .... If the input is a 9 chararcter, then digit to convert is equal to 9. If the input is a A chararcter, then digit to convert is equal to 10. If the input is a B chararcter, then digit to convert is equal to 11. .... | |
Re: > It seems that variable sharing between different windows is problematic. This is not true! Perhaps it is not easy or obvious, but it certainly is not problematic. Look [here](https://www.daniweb.com/programming/software-development/code/238279/bouncing-ball) how I tested parameter passing between two forms(windows). The essence is you got to have a public field in the … | |
Re: In my endorsements window I got plenty in "Web Applications". I never ever posted anything there. Now I noticed that section is also marked "Cloud-based Applications" | |
Re: Perhaps [conditional formatting](http://www.excel-easy.com/data-analysis/conditional-formatting.html) can solve your problem. | |
Re: You multiply the b constant by itself, that will be b^2. Then you multiply 4, a and c together and substract that product from b^2. You gave no more of the formula, so that is all I can do. | |
Re: Hmm, you seem to use other range in your question then in your code. Here is [how you can loop through a range of cells](https://msdn.microsoft.com/en-us/library/office/aa221353(v=office.11).aspx). | |
Re: Guess it is not possible in Java. The only thing close to it is this: > There is no way to access addresses of variables in Java. However, the default hashCode() method defined in the Object class, "is typically implemented by converting the internal address of the object into an … | |
Re: I supose you have to look for merging cells. [Example](http://forums.codeguru.com/showthread.php?415930-DataGridView-Merging-Cells). | |
Re: I could. You have to click somewhere in the thread title on the right, if my memory serves me well. Then all the other options appear. | |
Re: Is the square full of paint? C++ is a program that lives on a hard disk on a computer. How do you want to create a square with that? I would try a pencil. Do you mean, use C++ to compile some C++ code to show a square on a … | |
Re: Make your choice [here](http://freecomputerbooks.com/compscArtificialIntelligenceBooks.html) to solve your problem. | |
If I look at my endorsements, seems I have many in Web development. Never ever posted there something. Web development also seems to be my favorite forum??? I'm mostly to be found on the C# forum. Something to do with the fact that C# is only to be reached by … | |
Re: It was probably due to his conviction he finally killed himself. I sometimes wonder with what mathematical marvels he would have come up with, if he could have lived longer. I read "The annotated Turing" by Charles Petzold, telling some history and explaining his famous paper on computability. With some … | |
Long time passing . . . Hm, I'm deviating. No is this just temporarily or are they definitely gone? | |
This is a small one. Some time ago this table came in handy, testing out low level multiplication. And I just love multiplication tables. We all do, now don't we? :) | |
Re: I guess readability would improve, if the faint grey marker line between two posts could be a few pixels wider. And in "new dark blue"? | |
Re: Wow! Very nice design. I loved it from the moment I saw it. Keep up the good work Dani. :) | |
Re: Do your calculation in a function with as parameter a year and let your function return a date struct. Use this function in a loop. | |
Re: Referring to your first code listing. You said that indexing a string is somewhat cumbersome. Indeed it is. But the feature in the for loop on line 56 is a nice thing to have! No more index out of range errors. :) | |
Re: Just read through column A: if ="USA Hawaii" check column B and column C. IF OK do something, else continue reading column A. | |
Re: What have you got so far? Please post the code you already have, even if it doesn't work. | |
Re: On line 7 you are adding the lengths of your two array to sum together. With that length you are going to loop through this two smaller arrays. The perfect failure scenario! I would take the Min of the two array lengths to add and work with that. | |
Re: [This snippet](https://www.daniweb.com/software-development/csharp/code/452633/add-a-row-with-totals-to-a-datagridview) (to be found here on DaniWeb) is perhaps not exactly what you want, but you surely can get some ideas out of it. | |
Re: The second time in the loop, j will be 6, so left shifting 1 results in 01000000, wich now will be andmask, so again 1 wil be printed. When j becomes 4 down to 1 a 0 will be printed, the last time, when j=0, a 1 will be printed, … | |
What is not so clear is how to vote. Well it is obvious and well done in the new version, but I'm not sure if I can vote for myself now. ![]() | |
Re: Could you not use Func delegates instead of Action delegates? | |
Re: Did you notice that the terms of your series consist of `1/(10*N + 1)` and not 1/N ? |
The End.