71 karma · joined November 23, 2010
This would save a lot of initial loading time and could support maps much larger than 512 x 512.
I suspect the lag is caused by garbage collection taking too much time. I ran into a similar issue on Firefox when working on my canvas game. Not sure how this can be fixed. (fwiw, I am running on this on an i5 Macbook Air)
--------- MAJOR SPOILERS ---------
Let's multiply unique prime numbers and count their factors.
n Number of factors
2 2 (1, 2)
2x3 4 (1, 2, 3, 6)
2x3x5 8
2x3x5x7 16
Notice that each time you add a new prime number, the factor count doublesi.e. 2x3x5x...x500500th prime will have 2^500500 factors
The 500500th prime is 7376507 (thanks to wolframalpha), and it's not very big.
We can easily get the product of the above with 500500 multiplications while modding result of each step by 500500507 to get an answer.
Except that the product of first 500500 primes isn't the smallest number containing 2^500500 factors. This can be made smaller.
Observe that
(2x3x5x...x500499th prime)x2
has 2^500499 + 2^500498 factors.
This is because with the extra 2 we added, it produces additional factors with existing factors that are a multiples of 2.Continuing with this, we see that
(2x3x5x...x500499th prime) x (2 x 2)
has 2^500499 + 2^500498 + 2^500498 = 2^500500 factors.
This is a better solution, since 2x2 is smaller than the 500500th prime.If we want continue doubling factor count by multiplying 2s, we will need to multiply by 2x2x2x2 next, and 2^8 after, which becomes inefficient quickly. Instead, why not use 3? Multiplying (2x3x5x...x500499th prime) by (3 x 3) also doubles the factor count.
So at this point, we think about doubling factor count and the ways we can do it. Out options are
<1>. Multiply by a prime that we have never used so far
<2>. Multiply by an existing prime k + 1 times, where k is the number of times it has been used
We repeat this 500500 times, using rule <1> and <2> (which can be generalized to one rule) and the result is the final answer.
factor count n
2 2
4 2*3 <1>
8 2*3*2*2 <2>
16 2*3*2*2*5 <1>
32 2*3*2*2*5*7 <1>
64 2*3*2*2*5*7*3*3 <2>
128 2*3*2*2*5*7*3*3*11 <1>
For 16 factors the number works out to be 120 (just like the example!). For numbers shown in the questions, sieving the prime takes some time, I also found it helpful to use a binary heap for speeding up finding the next smallest factors.Callbacks:
Backend.CallA(param, function() {
aDone = true;
if (aDone && bDone) { doC(); }
});
Backend.CallB(param, function() {
bDone = true;
if (aDone && bDone) { doC(); }
});
Promises: var promiseA = Backend.CallA(param);
var promiseB = Backend.CallB(param);
$q.all([promiseA, promiseB]).then(doC);This is probably why SC has become very popular and still remains very popular. There are constant conflicts throughout the game trying to increase or take back the small advantages.
http://www.futureshop.ca/en-CA/product/hewlett-packard-hp-16...
What amazes me is how efficient the rendering is. It uses flash for rendering and is running fast on my netbook. If this could be taken into 3D games, it would make the game characters much more realistic/scary.
The hash value sent between player also hints the mechanism for drop hack. My guess it that the hacker would pretend to be the victim and send a bad hash values to every other players. The hash check would fail and the victim would just end up disconnected from the game. Haven't heard of such hack in SC2, wonder how they fixed it.
Right now, there are probably hundreds of such predictions about the future. Look at them again in 20 years, most of them will probably be incorrect. Yet there is always this one report (like this one from 1982) that will be shockingly accurate. The problem is that by then, it won't provide any useful information. We need is to know this is correct in 1982, not 2011.
One problem with this design is that the light would deflect off the center particle and melt other sand around it. In the video, pretty much everything in 1cm radius gets melted. Unless he can somehow make it print in greater details, I can't think of a better use for this other than producing planting pots.
1. Open "Documents and Settings\<user name>\Application Data\Mozilla\Firefox\Profiles\<profile>\extensions
2. Find the folder for the unsupported extension, there should be a file called install.rdf inside.
3. Open the file and change the <em:maxVersion> to 5.*.
Might have missed something, but that did the trick for me.