2,157 Posted Topics

Member Avatar for geekman92

How about the [URL="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html"]HTTP standard definition?[/URL]

Member Avatar for geekman92
0
263
Member Avatar for niketakapoor

DateTime.Now().AddDays(15) assuming today is the issue date. Take a look at [URL="http://msdn.microsoft.com/en-us/library/system.datetime.aspx"]DateTime[/URL] to see all the fun things you can do with it.

Member Avatar for niketakapoor
0
164
Member Avatar for Executionerr

[code]area = ((4/3)*Math.PI)*Math.Pow(this.data,3);[/code] In C#, unless you tell it, numbers without decimal points are treated as integers. So when it evaluates this statement it goes "hmm, integer 4 divided by integer 3. That gives 1". So change that to [code]area = ((4.0/3.0)*Math.PI)*Math.Pow(this.data,3);[/code]

Member Avatar for Executionerr
0
114
Member Avatar for tracydo

I once worked at a place where we were told we'd have to go back and flowchart all our old software. Over 100 applications and 10's of millions of lines of code. Most of the flowcharts ended up looking like this: Start -> Read Input Data -> Process Data -> …

Member Avatar for tracydo
0
123
Member Avatar for Suzie999

This method[code]public void _UpdateLabel(string text) { if (label1.InvokeRequired) { UpdateLabel updt = new UpdateLabel(_UpdateLabel); Invoke(updt, new object[] { text }); } else { label1.Text = text; label1.Refresh(); } }[/code] Is calling itself to update the label. You need to call a different method:[code] public void _UpdateLabel(string text) { if (label1.InvokeRequired) …

Member Avatar for Suzie999
0
206
Member Avatar for Jesi523
Member Avatar for Mike Bishop

Create two data adapters, one for each table. Set the CommandText to the appropriate command, call the Fill method on each DA, passing the DataSet and table name. You could do it with one data adapter, but you still have to make two fill calls.

Member Avatar for Momerath
0
393
Member Avatar for babafemi

Someone has to build the tools that 'every tom, dick and harry' use to make their applications. The first time I used VB I thought "This is too easy to make GUI applications". Then I looked at the applications non-programmers make and decided my job was secure for the forseeable …

Member Avatar for Knvn
0
114
Member Avatar for frogboy77

It's an novelty item. For the same price I could get a more powerful laptop, which actually has a screen. I won't be able to play C64 games on it since it doesn't have the emulator, but I can download one of those.

Member Avatar for e-papa
1
174
Member Avatar for domingo

It tells you the problem: [I]The directory or file specified does not exist on the Web server.[/I] Use the trace rule to figure out what is going on. It also tells you how to do that.

Member Avatar for Knvn
0
475
Member Avatar for mafiasam
Member Avatar for Portgas D. Ace
1
264
Member Avatar for WildBamaBoy

Line 32 is modifying the list which you aren't allowed to do inside of an IEnumerable loop on that list (the foreach is an IEnumerable loop). Your second method is what you need to do, not sure why you got an error you'll have to post your code.

Member Avatar for WildBamaBoy
0
161
Member Avatar for Momerath

I posted a code snippet ([URL="http://www.daniweb.com/software-development/csharp/code/355645"]Optimizing Matrix Multiplication[/URL]) and when I check the stats on it and click the [URL="http://www.daniweb.com/forums/linkbacks.php?t=355645"]linkbacks[/URL] I get a page of "Incompatible Browser | Facebook" links. What's up with that?!

Member Avatar for Momerath
1
141
Member Avatar for WDrago

Because assigning a value to a textbox replaces the old value. You probably want to append the string[code]TextBox1.Text = TextBox1.Text & "123456789"[/code]

Member Avatar for Unhnd_Exception
0
932
Member Avatar for CrazyProgrammer

Even though you may open, close, and create new SQL connections, behind the scene the system is maintaining multiple connections to your database just waiting for you to need one. This helps optimize your database code. So the answer is: Do what you feel makes your code more readable and …

Member Avatar for gusano79
0
237
Member Avatar for yousafc#

[QUOTE=CsharpChico;1533020]First of all, I would suggest using double instead of float because double can easily accept decimal point and when getting and Average it's not likely that the average will not have a decimal.[/QUOTE] What? [B]float[/B] type has a decimal point, as does [B]decimal[/B] type. I don't understand what you …

Member Avatar for CsharpChico
0
100
Member Avatar for easa056

[code]using System; using System.Collections.Generic; using System.Text; namespace TestBed { class TestBed { static void Main() { Stack<int> myStack = new Stack<int>(); decimal d = 4234234234234; decimal t = d; while (t > 0) { int r = (int)(t % 2); myStack.Push(r); t = Math.Floor(t/2); } StringBuilder sb = new StringBuilder(); …

Member Avatar for Momerath
0
312
Member Avatar for exca

Your inner loops run 205,891,132,094,649 iterations per outer loop. It's not infinite, but it might as well be. You need to reconsider what you are doing as you won't live long enough to generate all possible values for just one iteration of your outer loop.

Member Avatar for Momerath
0
147
Member Avatar for weasel7711

[code]using System; using System.IO; namespace TestBed { class TestBed { static void Main() { StreamReader sr = new StreamReader("Test.txt"); String currentLine = null; String startLine = null; String lastGoodLine = null; Boolean lookingForStart = true; while (sr.EndOfStream == false) { if (lookingForStart) { currentLine = sr.ReadLine(); if (currentLine.StartsWith(">")) { startLine …

Member Avatar for weasel7711
0
458
Member Avatar for Dinita
Member Avatar for CrazyMisho

[LIST=1] [*]Create Windows form application. [*]Add webbrowser to form [*]Add timer to form [*]Set timer interval to 10000 [*]Set timer enabled to true [*]Add event handler for tick event [*]In tick event, add the line [icode]webBrowser1.Navigate("http://mywebsite.com");[/icode] [*]Run code [/LIST]

Member Avatar for Momerath
0
102
Member Avatar for guru_iyer
Member Avatar for tetran

Read [URL="http://en.wikipedia.org/wiki/Floating_point"]this[/URL], particularly the section on Representable numbers, conversion and rounding.

Member Avatar for Momerath
0
82
Member Avatar for abelLazm

If you are given two DateTimes you might need to adjust one (or both) if it is Daylight savings time if you wish to accurately calculate the TimeSpan between them. All the rules for daylight savings time are contained within the libraries that are used to figure out what time …

Member Avatar for abelLazm
0
164
Member Avatar for baladeveloper

You need to install the Oracle client software on your machine, and configure the TNSNames file to properly reference your database.

Member Avatar for Momerath
0
92
Member Avatar for Behseini
Member Avatar for kvprajapati
0
664
Member Avatar for salmap

First, you put [noparse][code] before your first line of code, then you put [/code][/noparse] after the last line of your code. That way it will format it in a way that is easy to read (since you want to make things easy for the people who are going to help …

Member Avatar for kvprajapati
0
165
Member Avatar for scriptkiddy

It looks like there is a problem with one of the internal values. I say this because of the AIMLbot.Bot.get_TimeOut() line. It looks like it's trying to parse some text into a double and it fails. Are you sure the line [icode]myBot.loadSettings();[/icode] is actually loading the settings?

Member Avatar for scriptkiddy
0
718
Member Avatar for mrbungle

[LIST=1] [*]Use File.Copy to copy the XML file you just created. [*]Open two XmlWriter in your Using block and duplicate the part where you actually write. [*]Make your code a method taking a path/filename and call it twice. [/LIST]

Member Avatar for mrbungle
0
114
Member Avatar for CrazyMisho

change line 9 (the blank one) to [code]int[] myIntArray = list.ToArray();[/code]

Member Avatar for Momerath
0
302
Member Avatar for VilePlecenta

Use a FileStream instead of a StreamReader as it has a Seek method. And no, Read will stop at the end of the file. It also has a return value that tells the number of characters read.

Member Avatar for Momerath
0
7K
Member Avatar for xjustin

How can CurrHour = 6 AND = 7 (line 8)? How can CurrHour = 4 AND = 6 (line 10)? These lines will always be false since you require mutually exclusive conditions to both be true for the if to be true. Can you explain (in words) what the conditions …

Member Avatar for xjustin
0
106
Member Avatar for davewillis
Member Avatar for RockyMtnHi

Viewstate is used to persist values of controls across postbacks. For example, say you had a form where you fill out name, address, etc. but you forgot your email address. When you submit it the code behind says "need email address" and returns the page so you can fill out …

Member Avatar for Momerath
0
176
Member Avatar for CrazyProgrammer

Unless it's in an infinite loop, it ends when the method you used to start the thread is done.

Member Avatar for Venjense
0
94
Member Avatar for lianpiau
Member Avatar for Suzie999

Sounds like there is an issue with the win32 library probably manipulating the stack. Since the debugger makes changes to the stack (it's how it tracks things) anything else doing so can cause problems. When you run without the debugger you don't have this issue since only one process is …

Member Avatar for Suzie999
0
57
Member Avatar for computerbear
Member Avatar for jasimp
Member Avatar for mushahidh

What you do is go up to your instructor and say "Excuse me, but I don't understand this assignment. While I understand quicksort, I don't understand what you mean when you say 'a partition of 3, 5, 7 or 11 elements'. Would you please help me to understand what it …

Member Avatar for Momerath
0
221
Member Avatar for stow19

[code]Random r = new Random(); // CardArray is an array of type Card (or List<T>, etc. as long as it's indexable) for (int i = 51; i > 0; i--) { int s = r.Next(i); Card temp = CardArray[i]; CardArray[i] = CardArray[s]; CardArray[s] = temp; }[/code]

Member Avatar for stow19
0
124
Member Avatar for ashley11

[QUOTE=ashley11;1530854]i have a sortedLIst.[/quote]No you don't. Stop using the name sortedlist and use meaningful variable names. And if you don't show the declaration of the variable tell us what it really is.

Member Avatar for ddanbe
0
105
Member Avatar for Suzie999

Just FYI, if you don't want it short-circuited, use the single character versions of the operands: [code]if (test1() | test2()) { Console.WriteLine("Complete"); } static bool test1() { Console.WriteLine("test1"); return true; } static bool test2() { Console.WriteLine("test2"); return false; }[/code] Prints both test1 and test2 regardless of the return values.

Member Avatar for Suzie999
0
143
Member Avatar for Kath_Fish

You've been here long enough to know how to use [noparse][code] [/code][/noparse] tags.

Member Avatar for Momerath
0
158
Member Avatar for Formby

Use [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx"]SaveFileDialog[/URL] to select a location and [URL="http://msdn.microsoft.com/en-us/library/system.io.file.copy.aspx"]File.Copy[/URL] to copy the mdb file.

Member Avatar for Formby
0
159
Member Avatar for Momerath

Anyone else having issues with the javascript on Daniweb crashing Firefox 4? It doesn't happen all the time so I'm guessing it's some advertisement that is doing it. Just FYI I have no plug-ins, add-ons, whatever. Just the browser. It rarely happens in the programming forums, mostly in the Community …

Member Avatar for Momerath
0
249
Member Avatar for shyla

1) Create a class named "Game" 2) Add two auto-implemented properties "Name" and "MaxPlayers" 3) Override the ToString() method. Make it return the class name (from GetType()), the game name (from the property above), and maximum number of players (from the other property above). 4) Create a child class of …

Member Avatar for shyla
0
132
Member Avatar for NOVICE3
Member Avatar for NOVICE3
0
142
Member Avatar for missc

[QUOTE=abelLazm;1529988]The most suitable dataType for these type of comparisons is string as the retrieved data is in String form. [/QUOTE] This is contrary to what Microsoft says. According to the [URL="http://msdn.microsoft.com/en-us/library/ms131092.aspx"]SQL data types to CLR data mapping[/URL] money is a decimal type. Also using strings to compare numbers is a …

Member Avatar for Momerath
0
191
Member Avatar for gogs85

1) Get the site URI 2) Start a [URL="http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx"]Stopwatch[/URL] 3) Get site using [URL="http://msdn.microsoft.com/en-us/library/system.web.httprequest.aspx"]HttpRequest[/URL] 4) Stop Stopwatch 5) Profit!

Member Avatar for gogs85
0
100

The End.