1,443 Posted Topics
Re: I would do it like this: [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Windows.Forms; namespace DW_417279_CS_FORM { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { List<string> lst_str = … | |
Re: Those are registers. Please see this page as some of those registers have special purposes: [url]http://en.wikipedia.org/wiki/X86[/url] AX (ah, al) BX (bh, bl) CX (ch, cl) DX (dh, dl) -------------- Also investigate: SI,DI,SP,BP,IP ...and the "flags" If you still have DEBUG, you can run it and see those registers, pointers and … | |
Re: What does it do? Does it give an error or throw an exception? ...and is Comment the table name or column name? | |
Re: First things first: Does mergesort() take two or THREE parameters? You have it both ways. | |
Re: Is the file arranged in lines with either a linefeed or a CR/LF delimiter? 20GB (text)? Are you looking for something particular in the file? | |
Re: Since you're using Visual Studio 2010, can you just use C++/CLI to read and write the file? [CODE] #include "stdafx.h" using namespace System; using namespace System::IO; using namespace System::Text; int main(array<System::String ^> ^args) { String^ strFileName = "c:\\science\\test_utf8.txt"; File::WriteAllText(strFileName, "The quick brown fox jumps over a lazy dog", Encoding::UTF8); String^ … | |
Re: Can you show the line of code that throws the exception? | |
Re: Do you write it to a SPECIFIC directory or are you using "current directory"? | |
Re: Break up your main function into multiple functions. You can call them all from main. ...or are you implying you're loading a resource that is taking up too much RAM? | |
Re: The first thing you should understand is how commands group together. Certain values are set and then an interrupt is issued. When that happens, an effect takes place. [URL="http://spike.scu.edu.au/~barry/interrupts.html"]Reference[/URL] So, if you look at your first grouped "command", you see AH is being set to 1 and in interrupt 21 … | |
Re: Did you wrote the UPC1.ValidateUPC()? If so, is the parameter that takes the "temp" a (ref string ...)? Does it take a reference to a string (if you expect the string to be modified)? | |
Re: I made just enough adjustments to make it compile and run without crashing. There are some design adjustments you will need to make: [CODE] using System; using System.Linq; public class ArrayManagement { public static void Main(string[] args) { int[] myArray; myArray = new int[7]; myArray = fillArray(); int sum, avg; … | |
Re: There are so many examples of [URL="http://www.daniweb.com/search.php?q=game+of+life"]Game of Life[/URL] already on this site. You could probably find help with something already created. Although it might not matter for your OS, stdio.h should not be capitalized. ALL the compiler says is "declared here"? | |
Re: You could put them in a List<Panbel^>^ and do a "for each" on it. | |
Re: You need to find an integer inside of an integer array? Is there anything you're NOT allowed to use? [CODE] using System; using System.Linq; namespace DW_417111_CS_CON { class Program { static int find(int el, int[] a) { return a.ToList().IndexOf(el); } static void Main(string[] args) { int[] arr_int = new int[] … | |
Re: That may depend on how the given language recognizes objects. Some languages have a TypeOf() method that will let you inspect an objects type. That can be used to count those of a particular type in array. | |
Re: Did you double-click on the DLL entry in references and look at the contents in the object browser? | |
Re: You're not setting the reader to anything after its first use. You call command.ExecuteReader(), but you do not pass it TO the reader. Also, since you do not have an array of readers, something like reader(1).Read should cause problems. Also, since you are reading all of the data from the … | |
Re: It could be a multitude of things including: 1) the file is not in the expected directory when the program runs 1a) the program is running from a different directory than what you use manually. 2) The cron shell is not the same as your manually logged-in shell 2a) ...so … | |
Re: Why don't you use a counter and increment it when you get valid answers? When it hits 4, drop out of the loop. You could also just check to see if any of your variables is null (less than 4 condition). If there are more than 4, could you ignore … | |
Re: Did you set the value in your Web.Config? [CODE=XML] <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> [/CODE] | |
Re: No, because it is not necessary. You can fix that with a while statement. | |
Re: If running in Debug Mode, you can put a "breakpoint" on the last line and the program will pause there. | |
| |
Re: [CODE]webBrowser1.Navigate("http://www.yonewmail.com?"+ textbox1.Text, ...[/CODE] ...looks like you were missing the quotes. | |
Re: 1) Are you putting a space between the number and the base? -- if not, how does the program know where the base starts? << problem 2) Why is there an "atoi()" on line 5? -- can you just init that variable to 0? -- please initialize all variables 3) … | |
Re: If you are familiar with the registry, you can add an entry that marks when the license key was first entered. If a year has passed, you can make the program ask for another license key. | |
Re: Everyone has a personal preference. I prefer Visual Studio because of Intellisense (R) It helps prevent typos and other bugs while you code. Also, it will compile, link and deploy, if you want. Notepad does none of that. [Languages (ultra-simple explanation)] C is a general-purpose programming language C++ can be … | |
Re: Before you do that, you should work on getting the system time. | |
Re: It looks like some code has been removed. You're saying this code actually updates the database? In either case, the SqlCommand object is missing. | |
Re: Stuck with what? If there are links, are you trying to extract all of the links, then make either a browser or browser control go to those links in order? ...or something else? | |
Re: Just visually inspecting this, some definitions are missing: [CODE] vfpf(“%s %f %s”, stop, move, boom); // is this supposed to be vfpf(“%s %f %s”, stop, move, boom); tpfyl(); //where is this function? //tpm //Is this supposed to be file the pointer (fp)? [/CODE] The compiler will tell you the line … | |
Re: It really depends on the type of app you're creating and how the data is stored, but something like the following [I]could[/I] be in order. [CODE=JAVA] System.out.println(myDataSet.high); [/CODE] [CODE=C] printf("%s", myDataSet.high); [/CODE] It really just depends. | |
Re: Is the stream coming back as "lines"? With a stream across gmail, should you just use Read(...)? Also are you checking for the EndOfStream? | |
Re: Are you receiving that back as a formatted string? If so, can you do something like this?: [CODE] Imports System.Text.RegularExpressions Module Module1 Function ConvertValueString(ByVal strValueString As String) As String Dim dbl As Double = 0 Double.TryParse(Regex.Replace(strValueString, "[^0-9]", ""), dbl) ' digits only Return (dbl / 1000).ToString() & "kg" End Function … | |
Re: You could do something like this: I made a mock-up of the tables (using classes for easy explanation): [CODE] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DW_416318_CS_CON { public class CStudent { public int studentID { get; set; } public int rollNo { get; set; } public int … | |
Re: Are you trying to read the whole name or one character of the name? | |
Re: Does it do that for every stored proc? Does it do that for other pre-defined queries? | |
Re: Is it a requirement that you use a "while" loop? Yes, there is a way to pre-determine the number of loops, but it's not more efficient. | |
Re: Are M and N also integers or matrices of a particular size? | |
Re: Is the enter key throwing it off between reads? Can you read it all as strings then convert to integer or whatever you need? | |
Re: What have you tried so far? What I would do is make a function that returned a List of Integers. Each member of the list would be a random number between 0 and 100 minus (the sum of the list). Of course, you should loop one-less time than 4 (or … | |
Re: Will that compile? I've only seen enums done one way (the same (primitive) way) in both managed or unmanaged code. | |
Re: Did you do a search for palindrome on this site? There are many code snippets covering that. | |
Re: The reason this looks like homework is because: 1) It's in C. 2) You want someone else to do it. 3) [URL="http://www.daniweb.com/software-development/c/threads/415768"]Another poster[/URL] is asking for exactly the same thing at the same time. 4) It's a Leap Year calculator. 5) It has been a [URL="http://www.bing.com/search?q=Write+a+program+that+determines+the+day+number+%22%281+to+336%29%22+AND+%22date+that+is+provided+as+input+data%22&qs=n&form=QBRE&pq=write+a+program+that+determines+the+day+number+%22%281+to+336%29%22+and+%22date+that+is+provided+as+input+data%22&sc=0-0&sp=-1&sk="]homework assignment[/URL] for a while. … | |
Re: You would need to remove the 00:00:00 from your SQL string (first). Then, if the objects behind parameters @time1 and @time2 are DateTime objects, add the extra time (to the ending time) there (in the objects). ...then convert them to the SQL-suitable timestamps. Example: [CODE=TEXT] [Actual Timestamps / file names] … | |
Re: Start with this: [url]http://www.c.happycodings.com/Miscellaneous/code34.html[/url] | |
Re: What is this code supposed to do? There are a lot of things that [I]can[/I] be corrected, but I need to know what is the most important thing or what is the charter of the program. It looks like if you stick to either CLI or STL, you can get … | |
Re: Can you please post this question in the C# forum? Maybe someone will move it. With that said: What's wrong with the DataGrid and DataGridView? |
The End.