Search Results

Showing results 1 to 40 of 176
Search took 0.02 seconds.
Search: Posts Made By: Rashakil Fol ; Forum: C# and child forums
Forum: C# 25 Days Ago
Replies: 21
Views: 1,213
Posted By Rashakil Fol
The real value of a forum like Daniweb is in how it helps the people who search for problems in the future. The needs of the OP are immaterial.
Forum: C# 26 Days Ago
Replies: 21
Views: 1,213
Posted By Rashakil Fol
The reason it exists is because somebody put it there. Supporting the marking of threads as solved is like supporting the death penalty: innocent people will get executed, and threads with bad...
Forum: C# Oct 23rd, 2009
Replies: 5
Views: 310
Posted By Rashakil Fol
Obviously I wasn't talking about his code example because the methods there were not marked abstract.
Forum: C# Oct 23rd, 2009
Replies: 5
Views: 310
Posted By Rashakil Fol
Either that or the methods were abstract.
Forum: C# Oct 20th, 2009
Replies: 9
Views: 676
Posted By Rashakil Fol
Bah, I meant to uprep this post with "complete win" while downrepping the first, but forgot you could only rep somebody once per day. :(
Forum: C# Oct 19th, 2009
Replies: 5
Views: 451
Posted By Rashakil Fol
Static methods are just global functions that could very well have nothing to do with the class you've put them in. Methods that are not static are merely functions that, in their definition,...
Forum: C# Oct 19th, 2009
Replies: 7
Views: 307
Posted By Rashakil Fol
There's no such thing as a 'blank space.' An array with 64 elements will contain 64 elements. Some of them will be null, because that's what they were initialized with -- but that's no different...
Forum: C# Oct 19th, 2009
Replies: 7
Views: 307
Posted By Rashakil Fol
The "second" file from the list? Are you saying you're expecting Sort to look at the elements of the list in some particular order?
Forum: C# Oct 19th, 2009
Replies: 7
Views: 307
Posted By Rashakil Fol
If File y is null, what do you expect to happen? What is y.fsPos supposed to do when y is null? (Hint: it throws an exception.)

Apologies for the snark.

You should modify your Compare method...
Forum: C# Oct 13th, 2009
Replies: 5
Views: 592
Posted By Rashakil Fol
A Taylor series isn't really a good way to compute this function unless you're looking for asymptotic accuracy around a particular point, rather than general accuracy along the whole thing. Also,...
Forum: C# Oct 13th, 2009
Replies: 9
Views: 360
Posted By Rashakil Fol
First of all, again, you should be iterating i from 0 to 2, not from 1 to 3.

Second, how do you know (at the time this code runs) that gemData has been written to? If you were getting an index...
Forum: C# Oct 11th, 2009
Replies: 3
Views: 593
Posted By Rashakil Fol
Use private static Random random = new Random(); so that the same random number generator is used across different instances of Coin.
Forum: C# Oct 11th, 2009
Replies: 6
Views: 313
Posted By Rashakil Fol
For this specific mechanism, you could make a function that converts your ArrayList to a byte[] and then passes that through an MD5 or SHA1 algorithm or whatnot. See...
Forum: C# Oct 8th, 2009
Replies: 7
Views: 502
Posted By Rashakil Fol
Do your own homework.
Forum: C# Oct 8th, 2009
Replies: 4
Views: 461
Posted By Rashakil Fol
You have two problems with this method. One is that there is no proof that T : IEnumerable. You need to use a where clause to specify that. The other problem is that not all control paths lead to...
Forum: C# Sep 27th, 2009
Replies: 6
Views: 448
Posted By Rashakil Fol
I would use a List<> instead of an array, because you can create a List<> and then add new elements to it.


string[] someArray = new[] { "Alpha", "Bacta", "Cata", "Dooku", "Ephem" };...
Forum: C# Sep 25th, 2009
Replies: 1
Views: 216
Posted By Rashakil Fol
Huh? MSBuild, NAnt, ....
Forum: C# Sep 24th, 2009
Replies: 11
Views: 552
Posted By Rashakil Fol
It uses the function System.Linq.Enumerable.Where, which takes an IEnumerable<T> and a function of type Func<T, Bool> and returns an IEnumerable<T> that contains all the values for which the function...
Forum: C# Sep 23rd, 2009
Replies: 11
Views: 552
Posted By Rashakil Fol
Whoops, I meant path.Split(new[] { '\\' }, StringSplitOptions.RemoveEmptyEntries).

And if you wanted to filter the empty entries manually, you'd probably do

path.Split('\\').Where(s => s.Length...
Forum: C# Sep 23rd, 2009
Replies: 4
Views: 289
Posted By Rashakil Fol
All the fields of a class are allocated in the same place, right next to one another. That means variables whose type is some value type are allocated in the same place as variables whose type is...
Forum: C# Sep 23rd, 2009
Replies: 11
Views: 552
Posted By Rashakil Fol
Just use path.Split('\\', StringSplitOptions.RemoveEmptyEntries).
Forum: C# Sep 21st, 2009
Replies: 10
Views: 582
Posted By Rashakil Fol
You need using System.Linq; at the top of your file.
Forum: C# Sep 20th, 2009
Replies: 12
Views: 605
Posted By Rashakil Fol
Except when doing joins, I prefer to avoid the LINQ syntax and just use the Enumerable extension methods directly. It makes the behavior more clear, sometimes.

If you want things grouped by X and...
Forum: C# Sep 20th, 2009
Replies: 10
Views: 582
Posted By Rashakil Fol
It should work for List<Microsoft.Xna.Framework.Rectangle>, which implements IEquatable<Microsoft.Xna.Framework.Rectangle>. Maybe you're expecting the code to modify the original list object. It...
Forum: C# Sep 19th, 2009
Replies: 12
Views: 605
Posted By Rashakil Fol
You can and should use v.Last() instead of v.ElementAt(v.Count()-1). Using v.Last() also only iterates through the collection once, which is sometimes something to be aware of (and sometimes a...
Forum: C# Sep 18th, 2009
Replies: 3
Views: 436
Posted By Rashakil Fol
Blah blah blah, why don't you answer the question instead of linking to some reference site.

linkpraveen: if you use a List<Invoice>, for example, it's impossible to have anything in that list...
Forum: C# Sep 9th, 2009
Replies: 3
Views: 282
Posted By Rashakil Fol
Instead of keeping variables first_address, second_address, and third_address, and so on, make an array of addresses and walk through the array until one succeeds or until they all have failed.
Forum: C# Mar 17th, 2009
Replies: 1
Views: 374
Posted By Rashakil Fol
Forum: C# Mar 17th, 2009
Replies: 2
Views: 1,573
Posted By Rashakil Fol
ISingleResult<T> : IEnumerable<T>, so just use System.Linq.Enumerable.ToList.
Forum: C# Mar 16th, 2009
Replies: 2
Solved: byte vs char
Views: 1,320
Posted By Rashakil Fol
byte is an unsigned 8-bit integer whose values range from 0 to 255.

char is a 16-bit unicode character type. If you want to represent raw streams of bytes, you'll use bytes. You could also parse...
Forum: C# Mar 16th, 2009
Replies: 7
Views: 547
Posted By Rashakil Fol
What do you mean, the "SQL end"? Or "the application end"? I don't understand those terms.
Forum: C# Mar 16th, 2009
Replies: 3
Views: 427
Posted By Rashakil Fol
For starters, replace [1-9]+ with [1-9][0-9]*

When you use a preceding @ sign in C#, that means escape characters won't work. You can then write backslashes freely.

For example, @"C:\Documents...
Forum: C# Mar 16th, 2009
Replies: 7
Views: 547
Posted By Rashakil Fol
Yes, they use databases.

When we install software on a client we have some huge SQL files that create all the tables, indexes, and restrictions that we need.
Forum: C# Mar 16th, 2009
Replies: 4
Views: 593
Posted By Rashakil Fol
A lookup table as in something that contains a small set of standard board positions and tells you what to do in those cases.

You can implement it by programming.

You can define your own...
Forum: C# Mar 15th, 2009
Replies: 4
Views: 593
Posted By Rashakil Fol
It's a much simpler and better solution just to have a lookup table of all the nonobvious board positions modulo rotation and reflection.
Forum: C# Mar 15th, 2009
Replies: 3
Views: 427
Posted By Rashakil Fol
What's stopping you from making one?
Forum: C# Mar 15th, 2009
Replies: 8
Views: 1,164
Posted By Rashakil Fol
Forum: C# Mar 15th, 2009
Replies: 5
Solved: User Interface
Views: 524
Posted By Rashakil Fol
Huh? I did not say that at all.
Forum: C# Mar 15th, 2009
Replies: 5
Solved: User Interface
Views: 524
Posted By Rashakil Fol
Well, define "very nice." The niceness of a UI depends on the developer. How is VS 2008 stopping you from making a nice UI?
Forum: C# Mar 14th, 2009
Replies: 3
Views: 1,329
Posted By Rashakil Fol
Suppose the datatype you're using to hold an IP address is called IPAddress. Then you would want to use a List<IPAddress> to hold your IP addresses. If the datatype you're using is string, you'd...
Showing results 1 to 40 of 176

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC