|
About 4 of years back while solving Project Euler problems. I ended up writing this:
public class NthPrimeNumber
{
public string GetNumber()
{
long number = 0;
bool[] isComposite = new bool[1000002];
int primeNumberCount = 0;
int upperBoundRoot = (int)Math.Sqrt(1000001);
for (int i = 2; i <= upperBoundRoot; i++)
{
if (!isComposite[i])
{
primeNumberCount++;
if (primeNumberCount == 10001)
{
number = i;
break;
}
for (int k = i * i; k <= 1000001; k += i)
isComposite[k] = true;
}
}
for (int i = upperBoundRoot; i < 1000001; i++)
{
if (!isComposite[i])
{
primeNumberCount++;
if (primeNumberCount == 10001)
{
number = i;
break;
}
}
}
return number.ToString();
}
}
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
Learned it in Math class. I'm way too old to remember when exactly.
The world is going to laugh at you anyway, might as well crack the 1st joke!
My code has no bugs, it runs exactly as it was written.
|
|
|
|
|
5th grade math class (1964) what's a computer class? I liked it so much that I would do it to 100 on a blank sheet during idle moments. My other numbers game was doubling from 1 to get powers of 2. That would have been a couple of years earlier.
In theory, theory agrees perfectly with practice.
In practice, this is virtually never the case.
"*the {VOiCE} says: The truth is analog - not digital." - jonathan HICKMAN
|
|
|
|
|
I learned about the Sieve of Eratosthenes in my naive past after i thought i had come up with a novel approach at finding primes since you could use part of this sieve approach to compute primes in parallel (don't get me started). When i found out it was just a modified version of his sieve I fell into depression and never tried to do anything novel again. J/K...but seriously.
|
|
|
|
|
From Carl Sagan's Cosmos (original version)
|
|
|
|
|
So, why did I learn to read more...
I was interested in Prime Numbers since I was a kid.
When I got my first PC, I decided to write a problem to spin through prime numbers.
And I came up with this TOTALLY UNIQUE Idea.
Once ANY number becomes prime, all future multiples of that number are no longer prime.
(2 being the best example, eliminate every even number in the future)
So every number that is not already a multiple of a prime is then prime, etc.
And I wrote this, and was amazed that I was able to find primes without division!
Mind you: I wrote software to check most of my theory of matrices homework, and Diff Eq stuff...
(Because a monochrome computer screen was not good for much else, LOL)
So, I explain what I built to my lab partner in crime at University, and he says "Oh, you implemented the Sieve of Eratosthenes..." I was crushed. Then I was excited... (I am only a couple of thousand years behind the greeks... I can catch up)... Then I was crushed... (I had classes).
Ah, the good old days...
|
|
|
|
|
I have a disc that works perfectly fine in the XBox360 console. I would like to extract it into an ISO file so that hopefully I can get it running in Xenia. Anyway, I have tried apps like PowerISO & CloneCD, and every time I command it to read the disc, all I get is the drive whirring around and making strange noises while the app tells me to insert a disc into the CD. I have a blank CD, and when I put it in the drive, Windows Explorer did not complain one bit and simply asked if I wanted to format the disc. I have no other discs that are not XBox360 game disc.
I did exactly what folks that have videos online tell me to do, but it doesn't work for me. Of course, I have considered whether the CD drive is working properly, but the fact that it so easily accepted a blank disc seems to tell me that the drive is fine.
Any ideas?
|
|
|
|
|
You don't. It's specifically against the licensing agreement.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I've had CD's/DVD's that only worked in 1 drive before, frustrating.
If you know how to use a screwdriver pull the drive out of the xbox and plug it into the PC.
remember the "warranty is void" sticker on the xbox are no longer legal.
Signature ready for installation. Please Reboot now.
|
|
|
|
|
swampwiz wrote: hopefully I can get it running in Xenia Why would you want to run it in my home town[^]?
Software Zen: delete this;
|
|
|
|
|
If it was that easy, MS would have a serious piracy problem with the Xbox.
|
|
|
|
|
The thing is, if Micro$oft would just let folks play Xbox in Windows 10, I wouldn't be trying to pirate the system. This frustrated affair has put me into super-pirate mode, however.
|
|
|
|
|
swampwiz wrote: The thing is, if Micro$oft would just let folks play Xbox in Windows 10,
...then they wouldn't have a console to sell.
|
|
|
|
|
dandy72 wrote: ...then they wouldn't have a console to sell.
Actually, Micro$oft wants folks to play, at least certain titles, in Windows 10, and I don't think the reason is to sell hardware, but rather the content providers. Fine, make it difficult for me and I will seek "Jolly Roger" alternatives.
|
|
|
|
|
swampwiz wrote: Fine, make it difficult for me and I will seek "Jolly Roger" alternatives.
I grew out of that phase long ago. Is it really worth the time to you, and risk virus infection and the like because of dubious sources?
|
|
|
|
|
That is not a valid excuse for theft.
|
|
|
|
|
Richard MacCutchan wrote: That is not a valid excuse for theft.
This is an interesting concept in the age of intellectual property (IP) value. However, in the case, I am morally justified as I have rightfully purchased the IP, and I will not be selling the hard copy (or a soft copy) to anyone. And on side note, it is this type of behavior from the distributors of IP that makes its customers just say "the h3ll with it".
|
|
|
|
|
swampwiz wrote: in the case, I am morally justified Assuming you have legally purchased it, then you have also agreed to the licencing conditions. So no, you are not morally justified.
|
|
|
|
|
swampwiz wrote: However, in the case, I am morally justified as I have rightfully purchased the IP
You purchased a license to play a game, which is very different than purchasing the IP associated with said game.
|
|
|
|
|
Bread jokes are hard, but at yeast I try…
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
well that comment takes the cake
Signature ready for installation. Please Reboot now.
|
|
|
|
|
It's his rye sense of humor.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
OriginalGriff wrote: at yeast I try Any way you slice it, no one knead accuse you of being a loafer. In a little while, this reply will be sandwiched in between others.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
What are you trying to prove?
... such stuff as dreams are made on
|
|
|
|
|
That comment's subtle - but you did rise to the occasion.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|