Search Results

Showing results 1 to 40 of 183
Search took 0.03 seconds.
Search: Posts Made By: Rashakil Fol ; Forum: C# and child forums
Forum: C# 9 Days Ago
Replies: 4
Views: 443
Posted By Rashakil Fol
The first step to understand is that (loop for item in foo collecting bar) will ...

Heck, install SBCL yourself and run the code and do experiments that figure it out.
Forum: C# 32 Days Ago
Replies: 21
Views: 1,312
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# 33 Days Ago
Replies: 21
Views: 1,312
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# 34 Days Ago
Replies: 21
Views: 1,312
Posted By Rashakil Fol
I just don't want people to mark threads solved.
Forum: C# 34 Days Ago
Replies: 21
Views: 1,312
Posted By Rashakil Fol
Why do you get so butthurt when you see people with different worldviews than yours?
Forum: C# Nov 10th, 2009
Replies: 21
Views: 1,312
Posted By Rashakil Fol
Really, you and other people? Who would have thought?



No, it indicates that people think it no longer requires attention, but adds a presumption of the correctness of the answer -- and...
Forum: C# Nov 9th, 2009
Replies: 21
Views: 1,312
Posted By Rashakil Fol
Who cares?
Forum: C# Oct 23rd, 2009
Replies: 5
Views: 326
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: 326
Posted By Rashakil Fol
Either that or the methods were abstract.
Forum: C# Oct 20th, 2009
Replies: 9
Views: 732
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: 475
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: 310
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: 310
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: 310
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: 646
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: 387
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: 655
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: 315
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 9th, 2009
Replies: 7
Views: 513
Posted By Rashakil Fol
Why don't you do yourself a favor and start charging money to do people's homework for them.
Forum: C# Oct 8th, 2009
Replies: 7
Views: 513
Posted By Rashakil Fol
Do your own homework.
Forum: C# Oct 8th, 2009
Replies: 4
Views: 463
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: 459
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: 221
Posted By Rashakil Fol
Huh? MSBuild, NAnt, ....
Forum: C# Sep 24th, 2009
Replies: 11
Views: 575
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: 575
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: 295
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: 575
Posted By Rashakil Fol
Just use path.Split('\\', StringSplitOptions.RemoveEmptyEntries).
Forum: C# Sep 21st, 2009
Replies: 10
Views: 616
Posted By Rashakil Fol
You need using System.Linq; at the top of your file.
Forum: C# Sep 20th, 2009
Replies: 12
Views: 621
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: 616
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: 621
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: 456
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: 284
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: 389
Posted By Rashakil Fol
Forum: C# Mar 17th, 2009
Replies: 2
Views: 1,646
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,384
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: 560
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: 428
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: 560
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: 621
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...
Showing results 1 to 40 of 183

 


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

©2003 - 2009 DaniWeb® LLC