4,439 Posted Topics
Re: @sirlink99: good, but should line 5 of your pseudocode not read **else** instead of **gen == 9**? | |
Re: When I copy code from DaniWeb, linenumbers never get copied. | |
Re: Hi Danny, welcome to DaniWeb! Did you know there exists a [TimeSpan Class](http://msdn.microsoft.com/en-us/library/system.timespan.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1)? | |
Re: When you can avoid VBA macros, avoid them. Excel has a great set of worksheetfunctions, among them : **MAX** and **INTERCEPT**. Hope it helps. | |
Re: In the third row u = 3 not i At that moment line 6 of the code reads for (i=1;i<=3;i++) and i starts being 1. So 1 2 3 gets printed, the i-for loop finishes and u will become 4. Hope it clears things out. :) | |
Re: Read about ADO.NET. [Click Here](http://social.msdn.microsoft.com/Search/en-US?query=ado.net&ac=3) | |
Re: Perhaps you can use Excel to store the data and connect to it via C#. You could perhaps also have a look [here](http://www.daniweb.com/software-development/csharp/threads/224213/can-a-dataset-be-used-as-a-database) | |
Re: [Click Here](http://vb.net-informations.com/excel-2007/vb.net_excel_2007_tutorials.htm) for some example code. | |
Re: Line 51: 1/2 is integer division. So the outcome multipied with whatever will be zero! Use 0.5 or 1.0/2 instead. | |
Re: If I am a cell and if the cell right of me has the same value, I should color myself. | |
Re: Replace line 5 with **int colCount.dataGrid1.Columns.Count;** | |
Re: Perhaps you could use a DGVCombobox column? [Click Here](http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx) | |
Re: Perhaps you should consider WPF to design your styles? | |
Re: Change line 95 to **progressBar1.Value = listBox1.Items.Count;** progressBar1.Maximum should be set to the total numbers of tasks somewhere. | |
Re: I would try to use a paging technique. Google paging DGV or something. Hope it helps. | |
Re: You can adress the cells of a DGV somewhat like, you can do it in Excel. Use something like **myDGV.Rows[i].Cells[j].Value = myValue.ToString();** i and j are zero based. | |
Re: I had to look for it, but [click here](http://msdn.microsoft.com/en-us/library/ms171619.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1) | |
Re: I had the first edition of [this book](http://www.apress.com/9781430242093). Somewhere in it a meal delivery system was used as a design example.IMHO (I'm no pro) I guess what you are trying to do is sophisticated enough. Success! | |
Re: Try to keep the use of **goto** to a strict minimum. The way that it is used in your code is nice and clean, but we don't want to return to spagetti code BASIC I hope. There is also [this snippet](http://www.daniweb.com/software-development/csharp/code/371819/code-template-for-a-menu-in-a-console-application) with an example of how you could code a … | |
Re: [Click Here](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keydown.aspx) as a start. | |
Re: Cube for integers without multiplication: static int cube(int x) { int s = 0, c = 0; for (int i = 0; i < x; i++) { s += x; } for (int i = 0; i < x; i++) { c += s; } return c; } | |
Re: Someone once said(don't know who) : "As soon as you are born you are busy dying." So I don't worry getting older, it is an inescapable fate that awaits us all. And there is some other positive news! It has to stop sooner or later... I wear glasses, probably because … | |
Re: [Click Here](http://en.wikipedia.org/wiki/Lexicographical_order) What about 1+2+3 ? | |
Re: Line 26 of the OP code **else if(income>=70,000 && income >=50,001)** coulde be written as **else if( income >=50001)** Same for the rest of the else ifs | |
Re: > but i meet some errors Could you please state the kind of errors you are encountering? | |
Re: Not all colors have a name. With all the combinations of 255,255,255 integers you can form more than 1,5 million colors. There is however an enumeration that lists all the colors that have a name [Click Here](http://msdn.microsoft.com/en-us/library/system.drawing.knowncolor.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1) | |
Re: > this same code works as intended on another friend's machine, running the same software Strange. Did you ever encounter a **courses** variable that is both smaller than 4 AND greater than 6? Smaller than 4 OR greater than 6 is possible. | |
Re: Of course you can! Start a loop in the button click handler to print a report for every employee. | |
Re: Your while loop never gets executed with the condition **temp > 23** and temp being equal to **5** | |
Re: Could you explain a bit more please? What are your intentions with this eleborate scheme of yours? | |
Re: @Dani > In NYC it's called taking public transportation. I've never heard of "public transport". Transport is a verb, as in to transport something. Verbs can be used as nouns: [see here](http://www.enchantedlearning.com/wordlist/nounandverb.shtml) I think I'm beginning to agree with AD more and more... ;) | |
Re: You could write "hello world" programs in each of the languages. Then examine each .exe produced with the IL Dissasembler tool to see if there is a difference in the MSIL code produced. | |
Re: I guess you mean merging instead of wrapping? DaniWeb has a solution :[Click Here](http://www.daniweb.com/software-development/csharp/threads/371682/how-to-merge-specific-cells-in-runtime-in-datagridview) | |
Re: Just give it a try yourself. Come back here if you encounter any problems. Success! Oh, btw the 21st century started on 31 december 2000 one second after 23:59 hour.So whole of the year 2000, you still lived in the 20th century! | |
| |
Re: From your post I infer you are still struggling with the concept of recursion. [This snippet](http://www.daniweb.com/software-development/csharp/code/244162/square-root-calculation-with-iteration-and-recursion) might clarify things a bit, at least this is what I hope for. And BTW recursive hannoi towers are not easy, just as they are not difficult. They are often used as THE example … | |
Re: Why don't you set breakpoints so that the program falls into the debugger? Because now you can see all the values of your variables and better find uot how your program works. | |
Re: If you have studied, what is the proplem? What did you try, if you did encounter problems with what you have tried to work out, we are all so pleased to help you out. :) | |
Re: What have you done so far and what problems did you encounter? | |
Re: [This lesson](http://csharp-station.com/Tutorial/CSharp/Lesson06) might explain it much better than me. | |
Re: Seems OK, only on line 9 you are setting a string equal to a Single. | |
Lately, I was reading [this snippet](http://www.daniweb.com/software-development/python/code/453788/moon-phase-at-a-given-date-python) by vegaseat. I thought, why not do it in C#? But I would also like to add lattitude and logitude in the celestial calculations and draw a picture of the moon at that moment and location. Now the calculations can get a bit involved … | |
Re: Another important thing to remember is that a recursive method must have a stopping condition here it is **k==m**. The method prints something and "bubbles up" to the calling method etc. | |
Re: Could you not use some sort of [standard deviation](http://en.wikipedia.org/wiki/Standard_deviation)? The picture with the smallest S.D. would be closest to your "mean" picture. | |
Re: Perhaps a DataGridView and a DataGridViewTexBoxColumn could be more suitable for your purposes? | |
Re: Is the right version of .NET installed on the target machine? | |
Re: I have this method and it works fine with me: public void PutData(int row, int col, string data) { worksheet.Cells[row, col] = data; } Also keep in mind that Cells is a Range object. | |
Re: Tell us about what problem you have. [Click Here](http://www.freesoft.org/CIE/RFC/1832/10.htm) for some format info. | |
Re: To set a form non resizable, set the **MaximizeBox** property to **false** set the **FormBorderStyle** property to **FixedDialog** |
The End.