4,439 Posted Topics
Re: We don't do homework. We'll help you when you're stuck but you'll need to show some effort first. If you are stuck, post up what code you have done and explain the problem you're having. | |
Re: We don't do homework. We'll help you when you're stuck but you'll need to show some effort first. If you are stuck, post up what code you have done and explain the problem you're having. | |
Re: We don't do homework. We'll help you when you're stuck but you'll need to show some effort first. If you are stuck, post up what code you have done and explain the problem you're having. | |
Re: What do you mean by play in bed with a laptop? Some kinky stuff? | |
Re: Hi Jasdeep11 welcome. :) Do it like this: int total = 0; //initialize sum outside the for loop for (int a = 5; a <= 25; a++) { //add variable a every time to the total you already have //and store it again in total total = total + a; … | |
Re: Only one book? Run as hell to the library and consult and study as many books you can about C++ functions. Then try and code ONE function and see if it works. Continue. Your teacher gave you sufficient info. ![]() | |
| |
![]() | Re: I doubt if the [following](http://en.wikipedia.org/wiki/Roses_are_red) will still work. |
Re: Started learning it, more than a year ago with reading some books. Installed Python in Visual Studio.I installed version 3. I find it a bit annoying that there is no complete compatibility with older version 2 versions. You will find alot of Python code on the web, but watch out … | |
Re: A good thing is to start by reading [the Rules](https://www.daniweb.com/community/rules)s If you know how to get, let us say the minimum value out of a list of integers with a pencil and paper, then the coding is trivial. If you don't know how to do that, i guess you're in … | |
![]() | Re: Currently, in my spare moments, I'm taking a walk through [this](http://shoesrb.com/tutorials/) I must admit I'm a little bit more impressed. It reminds me of an older programming language I loved a lot: [LOGO](http://en.wikipedia.org/wiki/Logo_(programming_language)) It used(among other things) turtle graphics to teach very young childeren the basics of programming. Python still … ![]() |
Re: Did you ever tried to run the example from the book and saw if it worked? | |
Re: I used to use another strategy for accessing Excel, see this class: // **************************************************** // // Class to manipulate and work with Excel files in C# // DM 2.2.2009 // // **************************************************** using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using Excel = Microsoft.Office.Interop.Excel; namespace Peaker { class … | |
Re: Do you mean the column title and the type of the column? | |
Re: But my boss sad me to associate each row to my object. Is object the datagridview? What do you mean by associate? Datagridview has a property called DataSource, is it that what you want? | |
Fill in your birthday in the DateTime structure and get your sign as a string. Get an extra (an element associated whith the sign) via the out parameter thanks to C#! This switch statement uses returns all over the place, so a break staement is not needed. | |
Re: Do you mean a read of the file? Try [ReadAllText](https://msdn.microsoft.com/en-us/library/ms143368(v=vs.110).aspx) | |
I'm a great fan of extensions in C#. See also this previous [snippet](https://www.daniweb.com/software-development/csharp/code/467292/squaring-an-integer-with-extensions). Extensions are really simple to use. Start with adding a static class containing static methods. Note the special use of the keyword `this` in the Times extension method. The next code snip is how you could use … | |
Re: You can only work with pointers in C#, if you put the code in an unsafe block. Plus, you must mark it also in the build tab of the properties window of your project. Hope it helps. | |
![]() | Re: I could do this even some 10 and more years ago, without writing any code in VS! So what does Shoes make stand out?  ![]() |
Re: Instead of `scriptfile.Split(New String() {"GO"}, StringSplitOptions.None)`, did you try `scriptfile.Split(New String() {" GO "}, StringSplitOptions.None)`? | |
Re: Give that horrible code anyway and tell us what's wrong with it. We wont bite you and we don't laugh at people making mistakes. | |
I have this code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace RegexTest { class Program { static void Main(string[] args) { string str = "The quick brown fox."; string pat = "fox"; Regex rgx = new Regex(pat, RegexOptions.IgnoreCase); Match matches = rgx.Match(str); Console.ReadKey(); } } } … | |
Re: Read [The Rules](https://www.daniweb.com/community/rules). | |
Re: On line 25 you are assuming that named is completely filled. named.Length will be the full length of the string array not the length of the array that is partly filled up.The rest will be null. You can't add null to a ListBox. | |
Re: You are talking to us as if we were watching your computerscreen from over your shoulder.Please explain your problem as clearly as possible. | |
Re: If you are absolutely sure that DATETIME string always has the same format, yuo could use something like this: const int DateStrLength = 5; string DateTimeStr = "ADateATime"; string DateStr = DateTimeStr.Substring(0, DateStrLength); string TimeStr = DateTimeStr.Substring(DateStrLength, DateTimeStr.Length - DateStrLength); Now DateStr will contain the date part "ADate"and TimeStr will … | |
Re: Play computer! With a pencil and paper! Go through the factorial function. What value is x? Write down **x = 3** What value is f? Write down **f = 1** What value is i? Write down **i = x = 3** In the for loop the condition i >=1 is … | |
| |
![]() | |
Re: It was easier to let the code speak than to explain what needed to be done to correct the code in your while loop: namespace UserInput { class Program { static void Main(string[] args) { const string stop = "exit"; //used List instead of ArrayList List<string> CourseList = new List<string>(); … | |
Re: To get a vaue from a cell in a DGV use: `dataGridView1.Rows[RowIndex].Cells[ColumnIndex].Value;` or `dataGridView1.[ColumnIndex, RowIndex].Value;` Loop through the rows with a for statement and the desired column indexes and you're done. | |
Re: Google is your friend here. [Example](http://www.codeproject.com/Articles/13678/The-DataGridViewPrinter-Class). of many. EDIT: Just realized that it is not VB code in the example I gave you. But believe me you will find plenty of VB examples too. | |
Re: Hi GianiD, welcome at Daniweb. Assuming you're using vb.net, google for a course on DB. [Example](http://www.homeandlearn.co.uk/NET/nets12p1.html) | |
Re: Try new project, in the dialog that opens, on the left side, you will find "Reporting". Click on it. Now click on Crystal Reports Application. | |
Re: Hi k030775 welcome at Daniweb. :) Maybe you overlooked this [short article](http://www.codeproject.com/Articles/15460/C-Image-to-Byte-Array-and-Byte-Array-to-Image-Conv)? | |
Re: @Hatem_1: Please pose your question in a new thread, where you can refer to this one. | |
Re: Could you elaborate on that? Do you mean you have a hexdump you want to edit? | |
Re: I've included a zip with just the bare minimum, but I guess it will show you a mechanism on how to get two forms on speaking terms. Good luck! If still in trouble, just ask. | |
Re: Just running `var resourceNames = Assembly.GetExecutingAssembly().GetManifestResourceNames();` and watching with the debugger gave me this: resourceNames {string[2]} string[] [0] "WindowsFormsApplication3.Properties.Resources.resources" string [1] "WindowsFormsApplication3.Form1.resources" string Hope it helps a bit. | |
Re: Something like this: counter = dataGridView1.CurrentCell.RowIndex; Textbox.text = DataGridView1.Rows(counter).Cells("price1").Value.ToString(); | |
Re: Perhaps have a look at this [video](https://www.youtube.com/watch?v=nqC5GKr6yDY). Or you could read this [tutorial article](http://holowczak.com/getting-started-with-microsoft-visual-studio-2010-using-c-tutorial/). | |
Re: Is it somehow possible to tell us with what exactly you need help? For example the variable `b` never gets used, the while looks a bit strange etc. but as long as you don't explain more, we can do little but guess what the solution might be. | |
Re: Assembly in .NET has nothing to do with what you would expect reading the word. Read this [MSDN article](https://msdn.microsoft.com/en-us/library/ms973231.aspx). | |
Re: Every time you call `Player player1 = new Player();` you get the default values for player1. So if you set the properties for player1 like gender etc. and and you call `Player player1 = new Player();` again in another form(as I understood it that is) you just get a "new" … | |
Re: I would omit the StringBuilder phase and read the DB and write to the csv until done. | |
Re: Line 5 should be `f.open("nameoffile.dat",ios::binary|ios::out);` I guess. | being the bitwise operator. |
The End.