1,443 Posted Topics
Re: ...from what? ...from where? | |
Re: I don't see where m_Dept ior m_dept s defined. ...remember, C# is case-sensitive. | |
Re: An interface is an agreement that a class with conform to certain things -- like having certain methods. That way, the calling mechanism can be guaranteed it can call the play() method on your class if it is from the AudioClip interface. [url]http://en.wikipedia.org/wiki/Interface_(Java[/url]) | |
Re: I would use TimeSpan. [CODE] using System; namespace DW_401369 { class Program { static void Main(string[] args) { DateTime dtLastYear = new DateTime(2010, 12, 25); DateTime dtThisYear = new DateTime(2011, 12, 25); TimeSpan tsDiff = dtThisYear - dtLastYear; Console.WriteLine(tsDiff.Days);//365 } } } [/CODE] | |
Re: In Visual Studio you get an error that says "enumeration value is out of 'int' range". I have not yet tried it with other compilers. In gcc 3.4.6, it gives a Warning: [B]warning: this decimal constant is unsigned only in ISO C90[/B] ...and it will not compile | |
Re: Can you re-post the picture? I'm afraid to click that link. Can you attach it to the message instead of posting a link? | |
Re: I don't understand what you're actually trying to find. | |
Re: Did you rebuild all (including all dependencies) in release mode? | |
Re: Do you still have the file selected or the "project" in the Solution Explorer? | |
Re: Do you actually have to are it happen in firefox? Are you really just after the content on the last page? | |
Re: Here's a representation. I massage the data a little before running it through the Regex. How you will eventually modify this will depend on how the server delivers the html page. [CODE] Imports System Imports System.Collections.Generic Imports System.IO Imports System.Linq Imports System.Net Imports System.Text.RegularExpressions Module DW_396137 Sub Main() Dim strURL … | |
Re: So, what is supposed to be the output? -- just one of these records? | |
Re: Instead of a question mark, put a number. 1) Make a list of known primes and loop them through the test 2) Make a list of known NON-primes and loop them through the test 3) Take a list of random numbers and loop them through the test AND compare them … | |
Re: Does it REALLY need to be an array? Would a List of classes or List of KeyValuePairs work? | |
Re: I saw this answer: [url]http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=22347[/url] ...which says there is a Visual Studio Add-in to do that. The original answer was [URL="http://social.msdn.microsoft.com/forums/en-us/csharpgeneral/thread/903D9C3C-F4CD-4186-8B44-D807502CD8B9"]on this page[/URL] | |
Re: Your design is only reading the data into ONE club object. You would need to call "new" on each loop through the database. [at some point...] I recommend modifying the Club class to accept an IDataReader in a constructor. As you loop through the table rows, just call: [CODE] Club … | |
Re: You will see the answer on this page: [url]http://en.wikipedia.org/wiki/Unary_operation[/url] | |
Re: As long as the database is recognizable, the user can "mess with it". You could use fake fields and bitmapping to cut down on user manipulation, but then you would have to encode and decode the obfuscated data. | |
Re: It almost looks like you just need [CODE]echo "$2\n$3\n">>$nfile[/CODE] | |
Re: [Making sure I understand] You need to create a lotto program where the user tries to match a 6-digit number (or string) such as "123456". If the user matches at least three digits (in any order) in the string there is a winning message. If the user matches all 6 … | |
Re: First problem first. When you exit from a previous window, type in a text box and press enter, your app exits? Can you trap any exceptions (is an exception actually thrown)? What is the data type bound to your textbox? Are you trapping keypresses? | |
Re: I think [URL="http://en.wikipedia.org/wiki/Predicate_logic"]Predicate Logic[/URL] would be useful especially when dealing with databases and technologies that let you query [I]inside[/I] code. | |
Re: What do you mean "using Registry"? Do you mean the Windows System Registry? Are you trying to enter a value in the registry that will trigger the system to shut down? | |
Re: If you read the data into a class and put that class in a list, you can easily sort by a particular field. Do you have any restrictions on the types of technology you can use? | |
Re: [MS WINDOWS] If this is a console app or other app that runs unassisted, you can use the windows scheduler. This can be done from the command-line with the "at" command. Examine this: [CODE] at 05:05 /every:M,T,W,Th,F,S,Su c:\bin\ImportTrunkPlanData\ImportTrunkPlanData.exe [/CODE] Means at 5:05 every day, run the executable. If it requires … | |
Re: What error are you getting? Your connection string might need a security statement like this: [url]http://msdn.microsoft.com/en-us/library/d7469at0.aspx[/url] Aslo, please remove the SPACE after the equal-sign in "Ref#= " Also, do you really have a column with a # sign in the name? If you query this table with any other tool, … | |
Re: ...funny you should ask as I just wrote this snippet a couple of days ago. [url]http://www.daniweb.com/software-development/csharp/code/400854[/url] Make sure you're already adjusted your settings IN the gmail system allowing POP/SMTP. | |
Re: If pseudorandom21 does not have the answer to this, it could be that you've got the Dictionary file open with another utility that is causing a sharing violation. Aside from that, putting files in the root is not a good idea (unless this was just a test). | |
Re: I would uninstall the VS and start over as a separate install (if you can). | |
Re: You can store the data in files. - Individual files based on student and/or date - Group files based on students and/or date You can use a [URL="http://en.wikipedia.org/wiki/Document-oriented_database"]document-oriented database[/URL] - like [URL="http://redis.io/"]Redis[/URL] - like [URL="http://www.nosqldatabases.com/"]NOSQL[/URL] You can store the data in XML There is no specific "right way". There is … | |
Re: What happens if you do something like?: [CODE]Textbox1.Text = query.ToString()[/CODE] | |
Re: [CODE] try { // do stuff here } catch(Exception exc) { //Send mail here with contents of exc in the body } [/CODE] | |
Re: If you could give one of those a different parameter list, it would work easily -- even if the parameter is bogus. | |
Re: If you're allowed to use Linq: [CODE] using System; using System.Linq; namespace DW_400863 { class Program { static void Main(string[] args) { string strInput = "the Answer to life, the Universe, and everything IS 42"; (// ILookup<char, char> from c in strInput.ToLower().ToCharArray().OrderBy(c => c) where char.IsLetter(c) select c ).ToLookup(k => … | |
Re: Don't think about it as a list within a list. Rather, a Soldier has a list of skills. When you want to know a Soldier's skills, you look at its list. | |
Re: There are a couple of other UK students working on the same thing. Please check [URL="http://www.daniweb.com/software-development/csharp/threads/398791/1712071#post1712071"]this post[/URL]. Maybe you can work together. | |
Here is a technique I use for sending an email using GMail. Notice: You might need to change your email settings under [B]Forwarding and POP/IMAP[/B] inside your GMail settings (to Enable POP). Here is a test program for using the class library (shown in the snippet box): [CODE] using System; … | |
Re: There are two simple ways I've found. 1) Send an email to the phone based on the carriers domain 2) Send the message through a [URL="http://www.smartsms.se/webservice/wbssmsws/wbssmsws.asmx"]web service[/URL] | |
Re: How large are these files (and how many)? | |
Re: 1) Remove display functions from these classes - Display should come from outside 2) Actually declare the C1, C2 and C3 in your triangle class\ 3) Did you really want to pass a pointer to a list of triangles? - What is "refine" supposed to do? | |
Re: [url]http://www.daniweb.com/software-development/csharp/threads/398225[/url] I would not recommend the use of an Array List. Is a 2d array a hard requirement? | |
Re: [CODE] Application MyExcel = new Application(); [/CODE] 1) It looks also like you're opening the file twice. Is that intentional? 2) Is the life of your file only to exist inside the button-click? 3) If you are just harvesting data from the file, does it need to be visible? | |
Re: Have you looked up using System.Net.Mail; ? [url]http://msdn.microsoft.com/en-us/library/system.net.mail.aspx[/url] How about SmtpClient.Send(); [url]http://msdn.microsoft.com/en-us/library/h1s04he7.aspx#Y0[/url] You will need to have a server that will let you send anonymous mail (or embed an account inside the program (bad idea)). Be sure you have the users permission to send the mail. Maybe you could mention … | |
Re: Are you supposed to make a program? It sounds like you can just use your imagination. If you are having a problem with some code, post it here and we can help. | |
Re: One thing that may be causing you a problem is you are tying-in the functioning conversion tightly with the display mechanism and that is causing you to create a lot of code. Can you make a class that JUST does the conversions first? After that, you can determine which events … | |
| |
Re: Try this: [url]http://blog.degree.no/2011/06/webclient-httpwebresponse-problems-with-chunked-transfer-encoding/[/url] ... which says: [QUOTE]The easiest way to fix this is to make sure the HttpWebRequest is sent using HTTP 1.0 - this way the server will reply with a HTTP Header specifying Content-Length.[/QUOTE] [CODE] HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://www.degree.no"); wr.ProtocolVersion = Version.Parse("1.0"); [/CODE] | |
Re: At what line does it give you the error? | |
Re: 1) Did you forget to copy over some javascript to the server ("fn_" ...) ? 2) Are "pg" and/or "wtr" valid before the call to Server.Execute? |
The End.