1,443 Posted Topics
Re: [url]http://www.codeproject.com/KB/cs/FunctionOverloading.aspx[/url] | |
Re: You can add the punctuation to your alphabet OR you can have it eliminate things that are NOT alphabet or punctuation. | |
Re: Put the triple slashes /// at the top of a method or class. When you fill out the comments sections in that "structure" you will see those descriptions when you hover your items. When you hit the third slash, the structure will appear. Here is a simple one, but on … | |
Re: See if you can select the key first. | |
Re: I created a VC# 2008 Express project then loaded it with VS 2008 Standard and added a class diagram. When I re-loaded it in VC# Express, the class diagram FILE was there, but the content looked like this: [CODE] <?xml version="1.0" encoding="utf-8"?> <ClassDiagram MajorVersion="1" MinorVersion="1"> <Class Name="TestCDiagram.CThisThat"> <Position X="0.5" Y="0.75" … | |
Re: Well, you'll need a counter that counts (loops) from 20 to 65 so you can add the deposits and compound the interest. ...then print the result. I assume this will be a C# Console Application with the values shown using Console.WriteLine(); ( ? ) | |
Re: You would need to write an application that catches the menu's on-click message. Are you familiar with Win32 programming? Is this for a virus or spam-bot? | |
Re: In either case, I would put the file operations in a try/catch block. the exception.Message will tell you the error. It is [I]probably[/I] that youur account does not have permission to write in the root of C. | |
Re: No. Not unless you write your own browser that re-writes how right-click works. You could potentially create your app as an "Accelerator" depending on what it does: [url]http://www.pressthered.com/how_to_create_an_ie8_accelerator/[/url] | |
Re: You could do it in either language. If you don't like it running in the browser, you make a command-line version. [CODE] ######################################################################## # Read content from a web page $fileInFile=fopen("http://server.ext/Resources/SmallTextFile.txt", "rb"); while(!feof($fileInFile)) { $strData = fgets($fileInFile); printf($strData); } fclose($fileInFile); [/CODE] | |
Re: You should give your variables an initial value when you create them (especially chars and strings). | |
Re: If the variable "estatename" is part of "context" then: [CODE] ... where e.eventDate >= DateTime.Now && e.estatename.Equals(EstName) ... [/CODE] | |
Re: Take a look [URL="http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/bec110c9-fcab-4236-aeb3-5f71663f6bb7"]at this[/URL] | |
Re: Are you saying you are creating a web service and you want to return a string array of State Names? ...something like this, but a regular list? :[url]http://www.geocommunicator.gov/TownshipGeocoder/TownshipGeocoder.asmx[/url] | |
Re: [url]http://www.daniweb.com/software-development/csharp/threads/389484[/url] | |
Re: Are you using IIS? Are you running the web server on your development machine or a different server? | |
Re: If your service is on a public-facing web site, just give them the URL. | |
Re: 10MB of anything? You could make a program that watches the content of the temporary Internet files path and alarms when the amounts increases by 10MB. | |
Re: Probably because some things require dynamic memory allocation and type-checking. | |
Re: The first thing I notice is that you are using "choice" as an integer and NOT comparing the ascii value of the number 1 key. You are comparing the number 1, which is something different. [CODE] if (choice == 0x31) { FileRead wr = new FileRead(); wr.ReadData(); } [/CODE] ...or … | |
Re: What part of this is giving you a problem? | |
Re: Yes, but with no additional information, I would say to use LINQ. | |
Re: Yes, if your program does no other disk I/O in another directory after it has been started. | |
Re: To connect to the remote server, you would replace "localhost" with the remote machine's IP address or machine name. I would also adapt the use of the SqlConnectionStringBuilder so you won't need to worry about spelling and punctuation ([B]Like the space between USER and ID[/B]). | |
Re: You can read a string from a file and trim leading a trailing spaces "using trim()". You can use split("<delimiter goes here>") on Strings You can use charAt(num) on strings to get a specific character. [CODE] import java.io.*; public class DW_391778 { private static void DemoTrim(String strData) { System.out.println('['+strData.trim()+']'); } … | |
Re: [url]http://en.wikipedia.org/wiki/Indent_style[/url] Indenting (in Java, C, C++, C#) is pretty much making your code more readable. It [I]implies[/I] levels of execution and logic, but is purely a code management technique. Some other languages actually use indention to control execution. I love homework. [CODE] import java.util.Random; public class Card { public String … ![]() | |
Re: It should only give you an error in the "department" table if the F/K does not exist in the "class" table. What is the error text you are receiving? Also, what is the specific action you are doing in the department table? | |
Re: Are you having problems with a specific part? | |
Re: The MS Windows search function would let you find things in text files quickly like that. Other than that, what compiler are you using? It would be easier done in C++/CLI if at all possible. | |
Re: Your function was missing a final return option. If c is truly the final option, then change it to this: [CODE] public int mid(int a, int b, int c) { if ((a != b) && (a != c)) { return a; } else if ((b != a) && (b != … | |
Re: You don't need to use loops. You can [CODE]System.out.println(number1+number1+number2+number2);[/CODE] unless you need to create a function. [CODE] private static int sumInclusive(int number1, int number2) { return number1+number1+number2+number2; } [/CODE] | |
| |
Re: [url]http://www.dreamincode.net/forums/topic/143954-isprime-help/[/url] | |
Re: Are you attempting to stay connected to the database at all times or only when a query happens? | |
Re: What happens if you just remove the brackets from JobDate [] ? | |
Re: Here is a quick-n-dirty version: [CODE] using System; using System.IO; namespace DW_390448 { class Program { private static void Usage() { Console.Write("DW_390448 infile outfile"); } static void Main(string[] args) { if (!args.Length.Equals(2)) { Usage(); return; } try { using (StreamReader fileIn = new StreamReader(args[0])) { using(StreamWriter fileOut = new StreamWriter(args[1])) … | |
Re: Compile it. If you are using Visual Studio, select the Build option from the menu. If you are in release mode, the executable will be in the bin\release directory or the bin\debug directory for debug mode. You will need to distribute the main.exe file as well as any .dll files … | |
Re: I fixed a couple of typos in your coin class: [CODE] public class Coin implements Comparable<Object> { private double value; private String name; public Coin(double aValue, String aName) { value = aValue; name = aName; } public int compareTo(Object c2) { return (int) value; } } [/CODE] | |
Re: Yes. If you're familiar with web services, you can bind to this one: [url]http://www.webservicex.net/uszip.asmx[/url] It's a really easy way to get functions that perform a great service :) | |
Re: It really depends on the interface to the java web service. Is it public where we can see it? | |
Re: Not to beat a dead horse, but I'm surprised no one mentioned Regular Expressions [CODE] Imports System.Text.RegularExpressions Module Module1 Sub Main() Dim strTextBoxText As String = "asdf asdf <e2>code</e2> asdf asdf" Dim strCode As String = "Not Found" Dim rxE2 = New Regex("<e2>(?<target>.*)</e2>") ' If rxE2.IsMatch(strTextBoxText) Then strCode = rxE2.Match(strTextBoxText).Groups("target").Value … | |
Re: Here's a technique. Let me know if it's too fancy :) [CODE] using System; using System.Collections.Generic; using System.Linq; namespace DW_390972 { using KVP_S2I = KeyValuePair<string, int>; class Program { private static List<KVP_S2I> lst_kvpMonths = new List<KeyValuePair<string, int>>() { {new KVP_S2I ("January", 31)}, {new KVP_S2I ("February", 28)}, {new KVP_S2I ("March", 31)}, … | |
Re: Do you mean this? [CODE] #include <string.h> typedef struct Deity { char name[80]; char religion[80]; int numAppendages; } Deity; int main(void) { Deity* pDty = new Deity(); strcpy(pDty->name, "Fred Johnson"); strcpy(pDty->religion, "Methodist"); pDty->numAppendages = 6; printf("%s\n%s\n%i", pDty->name, pDty->religion, pDty->numAppendages); delete(pDty); return 0; } [/CODE] ![]() | |
Re: The tokens are char*, right? All you need is an array of char* of the size you need. Keep a counter as an offset and increment it on each loop. Are you keeping all of them? How many pointers/tokens do you need? ![]() | |
| |
Re: I would not suggest a RegEx if the target contents are ALWAYS the same value with random spacing. I would just remove all spaces from the input text and search for substring containment (Contains()). | |
Re: Check out Interfaces. You can have a list of Interface elements that will let you define a required Draw() method. Anything that goes in the list will have a Draw() method and will be referenced as the interface type itself. Check out [URL="http://www.daniweb.com/software-development/csharp/threads/389664"]this thread[/URL]: | |
Re: It looks like you've done everything except add the 16 credits: [CODE]myList2 = [] myList = [] myFile = open('lab11.txt','r') for myLine in myFile: myList = myLine.split() myList[3] = int(myList[3]) + 16 myList2.append(myList) print myList2[/CODE] | |
Re: use double-equals in the comparison. == [CODE]if(grid[0][0] == 2){printf("\n_");}[/CODE] |
The End.