1,443 Posted Topics
Re: I would not filter out records set "done" by the supervisor or manager because (seemingly) they would need to see if those records were marked. They should also need to ONLY see the "done" records so they know what to go verify. With that said, if you are asking how … | |
Re: Did you delete your Main() method? I have reformatted the code and removed two lines. I did not add any functionality or correct anything other than making a Main() and making the methods static and removing the Console.ReadLine() calls that are causing you to need to press enter: [CODE] using … | |
Re: There is no need to do that -- especially in C# and especially with the presence of Linq; If you have not yet discovered Linq (to objects) for querying inside your own code, you should investigate it. If you're just talking about the visual aspects, others have already addressed that … | |
Re: It means move the "contents" of this address into the register (instead of the value of the address itself). | |
Re: Start [URL="http://www.dreamincode.net/forums/topic/58021-deploying-a-c%23-application-visual-studio-setup-project/"]here[/URL] | |
Re: If you add a reference to System.Xml.Linq int your project and include the namespace: [CODE]using namespace System::Xml::Linq;[/CODE] You can use an easier set of xml classes stemming from XDocument. [CODE] XDocument^ xd = XDocument::Load("c:/science/zuba_sheet.xml"); //Write all nodes for each(XNode^ xn in xd->Nodes()) { System::Diagnostics::Debug::WriteLine(xn->ToString()); } [/CODE] Then you can have … | |
Re: If it's just text, it should not be a problem. Are you running into any binary characters? Would something like this also fail?: [CODE] File.WriteAllLines(@"c:\science\out.txt", File.ReadAllLines(@"c:\science\data.txt")); [/CODE] | |
Re: If you use Warning Level 4 and "all warnings as errors", you will reduce the risk significantly. Avoid direct casting between managed and unmanaged types. | |
Re: That's C++ that runs on the dot net CLR (managed C++). | |
Re: You can set the values of the enums so you never have a zero value. You can give each card a value that you want. You can have repeating values. You can cast the enums as integers or other numeric types. | |
Re: How can an online C# training exercise allow you to use any language? ...or is it: This is homework and you're learning C# online to solve it? ...doesn't matter as I will ask the same question: Which part is giving you a problem? Samples? Yes, there are multitudes of samples … | |
Re: Also, you should set your compiler warnings at the highest level, that way (if it is a signed/unsigned problem) issues like this will appear at compile-time. | |
| |
Re: Use a "for each" on the list and use ->Contains() on each string as it is looped. | |
Re: I ran this and did not get an error. I would suggest a serious restructuring of the code, however. If you're allowed or accustomed, I would recommend the use of a Dictionary<string, double> to allow quick lookups without all of the looping. [CODE] var map_s2dZipCharges = new Dictionary<string,double> { {"32309", … | |
Re: Did you accidentally redirect some functions? ...or hide them? If you add a new button with a handler, does the code compile? | |
Re: If treated as XML, Excel will load it. It will probably generate a warning, however. | |
Re: [QUOTE=gusano79;1748517] It's not really necessary, unless you absolutely must use precompiled headers. I'm guessing you don't need them.[/QUOTE] If building a native app, it's not "necessary" For DotNet and MFC apps, it is necessary (unless you want to do a few work-arounds). | |
Re: The best thing you can do is think about re-use of your code (and as mentioned consider stored procedures). You are the one who has to live with your code (for now) and your successor will have many questions. Write it in a way that serves you now and in … | |
Re: You will never regret learning it. You might always regret NOT learning it. The first time I saw Hungarian notation, I found it intimidating until I realized how much it helped (if the coder maintained the standard). I still use a modified rendition of it in every language I use … | |
Re: That will really depend on the data types. So, look at this example where I have a list of strings and a list of integers that I want to connect. I can simply do a foreach (or something else) to match them one-to-one. It really depends on how the data … | |
Re: 1) What does it do when you open an existing project? 2) Can you create a new one after that error goes away? 3) Is a Network Drive involved? [If all else fails] Can you re-install? | |
Re: Narrowing this down to the specific question, here is technique 1: [CODE] #include "stdafx.h" using namespace System; using namespace System::Collections::Generic; using namespace System::Linq; int main(array<System::String ^> ^args) { // Just some list... List<String^>^ lst_strData = Enumerable::ToList<String^>( gcnew array<String^>{"New Mexico", "Paul Newman", "Noobie", "Spiro Agnew"});//whatever... for each(String^ str in lst_strData) { … | |
Re: ...and do you really mean "c" language? | |
Re: It's just another environment where you can choose to take advantage of the benefits. The same concept applies to other operating systems and operating environments like Unix/Linux, DOS, Dot Net, JVM, Apple, Mobile (Android, Windows, iOS, WebOS), etc. Each environment has something for which it is well-suited. | |
Re: They could say it is false because the base class is not modified. It does not add functionality to the base class; it adds functionality to the class inheriting from the base class. | |
Re: You can create a custom class to hold a row of data then create a collection to hold all of the custom objects. Then you can traverse the data in any manner you wish without additional trips to the database (depending on the volume). | |
Re: I'm looking at this, but the first thing I see is a typo on line 44 (the semi-colon). Also the closing brace on 19 needs to be moved to 47 or 49. Also, C# is case-sensitive, so your numOfInPut should match the case of NumOfInPut. ...and if this was meant … | |
Re: Since I see you have some experience generating an Excel file from VB.NET, I'll just post the "meat" [CODE] Dim wb As Workbook = excel.Workbooks.Add(Type.Missing) Dim ws As Worksheet = wb.Worksheets(1) Dim rowCurrent As Range = ws.Rows(1, Missing.Value) CType(rowCurrent.Cells(1, 1), Range).Value2 = "Name" CType(rowCurrent.Cells(1, 2), Range).Value2 = "Age" CType(rowCurrent.Cells(1, 3), … | |
Re: You can use the FileInfo class or the FileAttribute. FileInfo has most of what you'll be looking for. [CODE] Imports System.IO Module Module1 Sub Main() Dim strInFile As String = "c:\science\test.txt" Dim fa As FileAttribute = File.GetAttributes(strInFile) Dim fi As New FileInfo(strInFile) End Sub End Module [/CODE] | |
Re: Can you load the entire file into memory? If so, load the whole thing - skip or eliminate the data you don't want - rewrite the file. | |
Re: What type of input are you looking for? Is there a specific question you have about something you've started? Is there a general question about what technology to use? | |
Re: A stack is: last in / first out A queue is: first in / first out | |
Re: Yes, if you control the server, you can. You can call the executable from a CGI or ASP or other just as you would spawn any other executable. You will need to adhere to the rules of the operating system for the given user account running under the server. | |
Re: [Way-back in memory] If you assign the control a variable, you can write to it directly. ...if you attach a CString to the control -- naming it strData, you can issue a command like strData = { converting the double to a string and placing it here. } | |
Re: 1) pass the dates to a function 2) evaluate failures first and call return false from the function early-on --- this eliminates the use of "else" and can remove some of the nesting. | |
Re: Line 6 should include a.h file, not a .cpp file | |
Re: Looks like you're missing a closing parenthesis right before the word VALUES ...or that it's inside the ] bracket instead of outside. | |
Re: Are you trying to Launch a Browser or get the HTML from a page? | |
Re: Did you look up split()? [url]http://www.rgagnon.com/javadetails/java-0438.html[/url] | |
Re: Can you accept a String then convert the characters to ASCII? They can still be digits or they can be any char (if that's allowed) Example: [CODE] import java.util.Scanner; public class StringToAsciiCodes { public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.print("Enter your specefic bytes(maximum 8 digits to show … | |
Re: You're mixing DataGrid with DataGridView. DataGridView does not have a .TableStyles property | |
Re: If I understand correctly, here is a console version of what you're attempting. It makes the assumption that every record has the potential of a different split based on the number of items per package dividing the total items in the order. It does a Math.Ceiling() to determine how many … | |
Re: [URL="http://www.codeproject.com/Articles/18314/Static-Initialization-Function-in-Classes"]Here is[/URL] another example. I tried it and it works. | |
Re: All this really needs is a little reformatting and an understanding that you've already defined the board, just go to the position. Also, since you had the constants alread defined, I used them and then changed them to #define to remove the memory consumption. I did not validate the positions … | |
Re: What error did you get? Were you trying to do this with code or just do it? ...or did you just want that stored proc for SQL Server converted? The last time I created a stored proc with code, I used something like this: [CODE=SQL] "create proc InsTestNum2(inTestNum) AS INSERT … | |
Re: Assuming you're just trying to write to a file... [CODE] using System; using System.IO; namespace DW_408731_CS_CON { class Program { static void Main(string[] args) { string[] arr_strData = { "230", "", ".01;.02;.03", "IPB", "10", "", "", "", "", "" }; string strTempFile = Path.GetTempFileName(); Console.WriteLine("Writing all lines to: " + … | |
Re: Do you have an example of the data or even the code you're tried? |
The End.