- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 305
- Posts with Upvotes
- 291
- Upvoting Members
- 185
- Downvotes Received
- 29
- Posts with Downvotes
- 24
- Downvoting Members
- 16
I am a (mostly) self-taught programmer with a love for what is "best".I started out in 1982 on a Commodore Vic 20 programming in BASIC.I moved on to Fortran, Turbo Pascal, AWK, 80x86 ASM, C/C++, Visual C++, Java, Ruby, Python and finally…
- Interests
- Coding; especially with anything that let's me use LINQ!
- PC Specs
- MS Windows XP, Windows Server, Windows 7
Re: You could start out with getting the user input of the word and then figure out the word length based on the left-over terminators. Start with something like this: [url]http://www.daniweb.com/software-development/assembly/code/270832[/url] ...then count the characters based on the start position until you run into a terminator. After that, you can copy … | |
Re: Here is a good resource on the switch/case/default statement( s ) [url]http://msdn.microsoft.com/en-us/library/66k51h7a(VS.80).aspx[/url] So, in your situation, you should treat the choices as characters. [CODE] int main(void) { char chrChoice = 'h'; double pay = 0; double rate = 35.0; double hours = 8; switch(chrChoice) { case 'h' : pay = … | |
Re: Certain collections are naturally suited to a DataGridView -- like a List<T^>. If I use a List<KeyValuePair<String^, String^>>^, I can store data in the DataGridView without additional manipulation: [CODE] System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { List<KeyValuePair<String^, String^>>^ lst_kvp_s2s = gcnew List<KeyValuePair<String^, String^>>(); // lst_kvp_s2s->Add(KeyValuePair<String^, String^>("President", "Dave")); lst_kvp_s2s->Add(KeyValuePair<String^, String^>("Vice President", "Robert")); … | |
Re: Does this make a difference? (PKCS7 vs PKCS5Padding): [CODE=C#]rijndaelCipher.Padding = PaddingMode.PKCS7;[/CODE] and... [CODE=Java]Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");[/CODE] | |
Re: After I corrected the XML (like some of the others), I wrote this piece of brutal overkill :) I know if I had just passed the XDoc, I could use some of the built-in search functions. using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; namespace DW_509677 { public class CAmazonTrackingObj … | |
Re: Does the "Job_active" value actually equate to a string that is "checked" or "unchecked"? Is the string check in your SQL code always case >>insensitive<<? "checked" does not equal "Checked" | |
Re: I'm still a little confused. What is an exact example of the output you expect? input = 1886.25 What do you want the program to show? | |
Re: Seemingly, the number has to be between 1 and 9, right? ...but if this is on a quiz, why would you want someone else to answer it? | |
Re: Without additional clarification (if you are using MFC, ATL, or .NET), here is a sample piece of code that reads a text file from a web server and extracts only the subtitles from what looks like story descriptions. The text is on [TextFiles.com](http://textfiles.com/adventure/221baker.txt). I use a WebClient with the method … | |
Re: How much do you have set up as "static" from your main module? How much is initialized before main runs? | |
Re: This looks like fun. Since it can be done in your language of choice, would you prefer it in C or some other language? Are you supposed to explain it when it's finished? | |
Re: If you have any of the MS Office products installed (especially Excel), you could experiment with VBA (Visual Basic for Applications) immediately. It's a fairly safe environment where you can understand how code flows and the use of functions and classes without needing to understand operating system quirks. Python is … | |
| Re: Make an array of 21 integers (default the values to -1). When a number is entered, go to the offset representing that number and add 1 to it. Of course, the final value of each will need an additional 1 added to report true hit-count. It seems as if you … |
Re: Your student array would not be a char pointer array. Student is now a new type. | |
Re: You have lots of opportunity to create functions out of this and, eventually, a class. One option might be to take the code that determines the price for the game and separate into another function. Above main(), you could have a function that returns the float (price) based on numGame: … | |
Re: In addition to what rproffitt mentioned, what processor are you targeting? | |
Re: I would sincerely cut the program into functions. One function would do nothing but count lines in a file (using any technique you wish). One function would copy from source to destination based on the number of lines counted. Avoid printing (or screen writes) inside of the functions. Please forgive … | |
Re: Are you trying to GENERATE one or PRINT one or DISPLAY one? Have you reverse-engineered something like this?: https://www.codeproject.com/articles/20574/open-source-qrcode-library | |
Re: Can you isolate the login process to a single method so it's testable? | |
Re: If you search this forum, you will find someone working on practically the same thing. | |
Re: 1) It would be nice to have a do-loop around your login function so the user will be forced to login or quit 2) Inside "mainMenu()" the test for the option should be shortend to JUST ensure a correct choice is made. Once made, the program can drop down to … | |
Re: This can be tricky depending on the cleanliness of the CSV. Was it created manually, or with Excel? Will there be commas in quoted fields? What compiler are you using? What techniques are you not allowed to use? | |
Re: Is this going to be a GUI or a console app? Will you use a database to keep the inventory and purchase history? I would imagine needing a database to determine the rebate (unless it's done immediately). BTW -- is the rebate on the original price or the price after … | |
Re: What compiler are you using and what is considered "off-limits"? You need to "group" your records by the ID. If your grouping container does not keep the same order as the file, you will need to index the records when they are selected. 1) Test for the presence of quotes … | |
Re: This sounds like fun. How are you going to start the program? What technique will you use to determine if a number is a prime? | |
Re: A single question in the question-key file could have its own class. You can then put all of the questions into a collection. I would imagine a structure of (QUESTION_NUM, QUESTION_VALUE, ANSWER) ...maybe tab-delimited The student's answer file would have a simpler structure (QUESTION_NUM, ANSWER) -- with the student ID … | |
Re: How do you know the default directory? It could be trying to save the file in an area where you don't have write-access. Simply using "test.txt" without specifying the directory/folder leaves you at the mercy of the last file-pointer. | |
Re: Can you write the program to run normally and then schedule it with the System task scheduler? | |
Re: What version of Visual Studio are you using? Can you use the built-in test-suite? |