2,157 Posted Topics
Re: Move the connection string out of your code into [URL="http://msdn.microsoft.com/en-us/library/aa730869%28VS.80%29.aspx"]Application settings[/URL] | |
Has been released by Microsoft. It includes [LIST] [*]64-bit Windows Developer Preview [*]Windows SDK for Metro style apps [*]Microsoft Visual Studio 11 Express for Windows Developer Preview [*]Microsoft Expression Blend 5 Developer Preview [*]28 Metro style apps including the BUILD Conference app [/LIST] You can download it [URL="http://msdn.microsoft.com/en-us/windows/apps/br229516"]here[/URL]. I'm about … | |
Re: Wouldn't that be the BeforeExpand/BeforeColapse events (along with the AfterExpand/AfterColapse). | |
Re: When you are building something that others will use (like the Forms class in the .NET library), you don't know what methods that will be called when things like events happen. So you use delegates. Delegates help your code be more reusable. | |
Re: In line 1 of your first code block you declare a variable of type DataSource array, but you never actually assign any objects to it. So when you try to index the array in line 8 of the same block, there isn't anything there. You need something like [code]DataSources[] dataSources … | |
Re: If you really despise programming you probably won't be employed long doing it. There are enough people out there that like programming that no employer will feel the need to keep you on. It's never too late to change your major. I changed mine at the end of my 4th … | |
Re: adatapost has it right. Separate indexes for each column. I do have to ask what you mean when you say you use a binary tree for indexing. MySql (last I checked) uses an unordered hash for indexing. And if I understand you correctly, you are loading over 3 days of … | |
Re: MaskedTextBox doesn't have a mask for hexadecimal characters, you'll have to use a normal textbox and intercept the KeyPress event to validate input (and to insert the spaces as needed). | |
Re: [code]String[] lines = File.ReadAllLines("c:/science/TomDigs.txt"); String[][] data = new String[lines.Length][]; for (int i = 0; i < lines.Length; i++) { data[i] = lines[i].Split(','); }[/code] | |
Re: league is defined as an array of Club[], but you never actually create any club objects and store them in league, so when you try to use it in like 15, there is nothing there to use. | |
Re: Take a look at it this way, your equation boils down to X * (1 + SomeNumber) <= MAX. So X can range from 0 to MAX/(1+SomeNumber). This means the rest of the values (y, z, p, q) don't matter, you can put anything you want in there, as there … | |
Re: IIRC, while using SQLExpress and running your program in debug mode, it makes a copy of the database file. This copy is used during the running of the program, then deleted when the run is over. This is so you can start debugging again from exact same conditions you started … | |
Re: [QUOTE=Rashakil Fol;1498063]1. There is no 5th generation of programming languages.[/QUOTE][URL="http://en.wikipedia.org/wiki/Fifth-generation_programming_language"] Really?[/URL] Prolog would like to have a word with you. | |
Re: It is splitting the arguments into two, like you show. It does that because of the space. Command line arguments are always separated around whitespace. To get it as one argument, you'll need to enclose it in quotes, like this:[code]startInfo.Arguments = @"""<fulljslint.js >jslint.js""";[/code] The double quote is the escape sequence … | |
Re: [QUOTE=Sokh;1676383]Hi everyone,Can you please help me? I want a C# code for taking time and date from a site and import this time in my program,can you pls help me.[/QUOTE] What site? Where is the date/time on this site? | |
Re: I would create a class that holds each element and the information that you need about that element. Then I'd create a class that knows how to display that information and generate a tooltip on mouseover. Then I'd put them on a form :) | |
Re: [code]public List<int> Factors(int n) { List<int> result = new List<int>(); for (int i = 1; i <= n/2; i++) { if (n % i == 0) { result.Add(i); result.Add(n/i); } } return result; }[/code] If you need them in pairs [code]public List<FactorPair> Factors(int n) { List<FactorPair> result = new List<FactorPair>(); … | |
Re: You make the assumption that the two arrays you are referencing (result.Properties[parametr1] and result.Properties[parametr2]) have entries in them. It's telling you that they don't. You need to check them first. | |
Re: Don't you have an advisor for this? It's part of their job to help you pick a thesis topic. | |
Re: [QUOTE=Jonathan C;1677507]my question is how to make random double values?[/QUOTE] From the problem statement : The array will be filled with random double values ( [B]use rndGen.NextDouble( )[/B] ) each with a range of 0.0 to 100.0. | |
Re: What it is telling you is that there is no method to cast the DefaultHttpHandler into PgDisplayBase. You'll either have to develop your own or find if the PgDisplayBase class has a method you can call to convert it. | |
Re: Using enumerator [code]using System; using System.Collections.Generic; namespace ConsoleApplication1 { class Program { static void Main() { foreach (int p in Primes(2000)) { Console.WriteLine("{0}", p); } Console.ReadLine(); } static IEnumerable<int> Primes(int limit) { if (limit > 1) { yield return 2; List<int> primes = new List<int>(); int v = 3; while … | |
Re: Brushes is in System.Windows.Media. The IDE should have put a red underline at the beginning of Brushes and you could hover your mouse over it, click the pop-up and you'd see the option to add the proper using statement. | |
Re: Since you are going to have to sort the digits that make up the numbers it's easier to convert them to strings, manipulate the digits then convert them back to numbers. With the conversion to string you can specify that it have leading zeros, so that will make it easy. | |
Re: "Microsoft works on the first version of a new operating system. Interface Manager is the code name and is considered as the final name, but Windows prevails because it best describes the boxes or computing “windows” that are fundamental to the new system. Windows is announced in 1983, but it … | |
Re: The problem is that you have an open read operation on the connection when you try to execute another read operation. You need two connection objects if you want to have two 'read' operations open at the same time. | |
Re: [QUOTE=HackRabbyt;1669762]If you input a character instead of an integer value for work identification number or input an hourly salary value that is less than 5 or greater than 55, you'll see what I'm talking about.[/QUOTE] Of course it does, that's what you told it to do. Line 17-35 is your … | |
Re: You can use Regex.Replace with the case insensitive option (and use Regex.Escape on the parameters, just in case). If you want to preserve the case of the found item then you'll have to do that on your own, and figure out how you're going to deal with situations where it's … | |
Re: Given a list of BaseIDs and a FinalID, generating all possible combinations to determine which BaseIDs are used in that FinalID is the hard way to go about it. Iterate through the list of BaseIDs. For each one, AND it against the FinalID and if the result of the AND … | |
Re: [QUOTE=johnt68;1665692] I only get one error under the method name again [COLOR="red"]'TemperatureConvertorPractice.Form1.inputMethod()': not all code paths return a value.[/COLOR]:-/[/QUOTE] This would be an error in your inputMethod() code, not in the code you've posted. What it is telling you is that it is possible for the code to reach the … | |
Re: In your original code you were creating one list (temp) and adding multiple references to it (tss.Add(temp)). These are all the same list as you don't create a new one and Add just adds a reference, it doesn't copy the list. Since your first line in the loop cleared the … | |
Re: Put a break after line 15, there is no need to continue checking if the rest of the digits are 0 or 1 after you've found one that fails. You could also use a Regex[code]if (Regex.Match(binarynumber, "^[01]+$") == null) { // not a binary number } else { // is … | |
Re: Since your screen is flat you can't draw a cube on it. You can draw a 2-D projection of a cube, which, depending on the angle of viewing, could look like a square. Thus he's given you the drawing of a cube. | |
Re: Line 18 you attempt to call a method called GetStudentID. But in line 40 you declare a property called GetStudentID (and declare it wrong). I'm assuming you meant to put () on the end of line 40. Line 23 you attempt to call a method DisplayResults with 3 parameters. But … | |
Re: It appears that the code you are looking for is generated by the javascript in the page, thus it isn't part of the HTML. When I use View Source in Firefox, it only shows the bottom HTML you have, nothing about each of the players. | |
Re: Would it be possible for you to show the code you are using? It's hard to debug code without actually seeing it. | |
Re: [url]http://www.businessinsider.com/how-to-make-money-on-youtube-2010-8#[/url] Read the whole thing. | |
Re: Your SQL command is incorrect, from the ADO.NET documentation: [i]The .NET Framework Data Provider for OLE DB and .NET Framework Data Provider for ODBC do not support named parameters for passing parameters to an SQL statement or a stored procedure. In this case, you must use the question mark (?) … | |
Re: Just because you formatted the display value doesn't change the value. If you want it to save the rounded value you'll have to actually round the value. You'll want to take a look at [URL="http://msdn.microsoft.com/en-us/library/75ks3aby.aspx"]Math.Round()[/URL] | |
Re: [QUOTE=Lord Soth;205644]Hi, SQL Express and all express products are free for personal use, but they aren't free (not allowed at all to be exact) for commercial use, commercial products or redistribution. [/QUOTE] This is flat out not true. [URL="http://www.microsoft.com/express/Database/"]SQL Server 2008 R2 Express page[/URL] "Available free for both development and … | |
Re: [B]MO[/B]bile [B]U[/B]ser [B]S[/B]ystem [B]E[/B]mploying [B]TR[/B]ansparent [B]A[/B]uthentication [B]P[/B]rotocol | |
Re: I'd check the registry rather than try to search the 100,000's of files on someones computer. On my machine, the key is [B]Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Adobe\Acrobat Reader[/B] (this is W7 Ultimate 64bit). You'll probably have to find OS versions to figure out where it is for them. [B][B][URL="http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx"]Registry Class[/URL][/B][/B] | |
Re: I'm the opposite of Mitja, I use regions all over the place. Usually have them for Properties, Constructors, Public Methods, Private Methods, Internal Classes (usually named Helper Classes), Events, and Interfaces, to name a few. | |
Re: Line 75 ends your class, and line 79 ends the namespace. Move those methods to before line 75. | |
Re: Sorry, not going to download some random exe file. | |
Re: At the top of the forum it says: " Also, to keep DaniWeb a student-friendly place to learn, don't expect quick solutions to your homework. We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well." So put … | |
Re: 2 could be true if you include Gaussian integers. The joys of complex numbers :) | |
Re: In Step 4 you only need to check up to the square root of the number (think about it for a bit and you'll see why). It will speed up your code as you'll be checking a lot less numbers. Also, checking all the even numbers slows you down, as … | |
Re: What it means is that the name you are providing inside the [] doesn't exist, so it's a null and you can't set the BackgroundImage of a null. I'd also load the image once, then set all the buttons to that image so you don't have to do 92 disk … | |
Re: 2 is the correct answer. That's not multiply, that's dot product. Notice the dot between them. |
The End.