Up at the top of this list of questions is a selection "How to get an answer to your question".
Read it, and try again.
This may explain why you (currently) have 7 votes for "Bad Question", and none for "Good question". It may also explain why you have no replies (other than this, if you are going to be picky)...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
Dear members am glad to be a member of this blog.
I would like to pass on my special thanks to all who have helped me to learn how to program in C# .
It is because of you that I learnt how to Design a music player.
Now pliz help me to skin my player. Email:email@example.com
Those interested in Friendship are highly welcomed.
Am george based in Uganda.
Firstly, I congratulate you on learning a programming language by teaching yourself, if you have made good strides then that's great.
Secondly, if you posted here, you should be familiar with the rules by now. Start doing something, if you get stuck then post exactly where, don't e vague asking for general help like 'skinning your player'. Don't post your email either, it's an invitation to get spam.
According to the documentation and the compiler warnings you must be getting Thread.Suspend is obsolete since .NET 2.0; you should not use it any longer.
FWIW: To abort, you should undo the suspension, hence try Thread.Resume first.
Luc Pattyn [Forum Guidelines][My Articles] The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
Well, if it does, the code isn't really parallelizable. If each iteration of the for loop overwrites the variable in a way that is dependent on previous iterations, it doesn't really make sense to parellilize it. For example, if it really is calculation of primes, then numbers = 10000 could run before numbers = 2.
The problem you have is that you don't know the bounds of your input - you don't know how big number will have to get to generate the required number of primes.
However, you can still parellelise chunks of work - something like this:
constint N = ( int ) 1e6;
staticreadonlyint STEP = Environment.ProcessorCount * ( int ) 1e6;
var primes = new List<int>( N );
for ( int start = 2 ; primes.Count < N ; start += STEP )
Enumerable.Range( start, STEP )
.Where( i => IsPrime( i ) ) );
primes = primes.Take( N ).ToList();
You'll have to tune the values of N and STEP for your specific case.
Be excellent to each other
I am working on a small application that checks what browsers are installed on a system running Windows Xp... I was able to find the right entries to check whether Firefox and Chrome are installed or not... And after quite some amount of googling about IE, I found that IE might get corrupted due to some unforeseen reasons... So, is there a possibility of a windows system to have NO internet explorer installed? If yes, How can I check whether IE is present or not.. Please suggest...
IE is a part of Windows itself and you can safely assume its existence on Windows. I personally won't go bothering about an usecase where the IE installation is corrupt for some unforeseen reasons. It may be negligible.
It is a crappy thing, but it's life -^Carlo Pallini
Is there any way to get a XmlTextWriter to work with a MemoryStream, so that it doesn't close it when it is finished?
What I'm trying to do is:
List<T> -> MemoryStream (as XML) -> TripleDES encyrption -> file.
file -> TripleDES decryption -> MemoryStream -> List<T>
And since XmlTextWriter always closes the stream when it completes, the MemoryStream is useless!
Yes, XMLTextWriter has settings, but they are null or read-only, so you can't set "CloseOutput = false"
(No, I don't want to use XMLSerialiser, for very dull reasons!)
I have got round it by moving to XmlWriter and using the settings that way, but this was such a waste of time!
WriteXML(listCards, new XmlTextWriter(stream, Encoding.UTF8));
Does anyone know a way I could simulate 7.1 channel surround sound with DirectX? Our school is doing the Wizard of Oz as the school play this year, and as part of it, we want the tornado to move around the Audience, we have speakers in the right spots, and the everything we need to drive them, its just we need to be able to move the sounds around and make them feel realistic to the audience.
So in short, does anyone know how I could set up 7 listening devices in DirectSound or XNA so that the levels change for each speaker as the virtual speaker moves throughout the audience.