I bought a G1 last spring.
The first thing I did was reformat the drive and install XP.
I bought a G1 last spring.
The first thing I did was reformat the drive and install XP.
@kirchhoff said:
@Dark Shikari said:Neither, 4chan itself. World4chan, technically, but they're all now hosted on 4chan without any distinction from the other boards. Textboard, of course. If 4chan/prog/ was an imageboard it would probably end up spammed by pictures of Sussman.Delightfully ripped from /prog/
7chan or iichan?
@obediah said:
@Dark Shikari said:Delightfully ripped from /prog/:
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
Newbie programmers come with tail recursion now? I find that hard to believe. I might buy
def factorial(x):
return x * factorial(x-1)
print factorial(6)
Delightfully ripped from /prog/:
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
def factorial(x):
result = 1
i = 2
while i <= x:
result = result * i
i = i + 1
return result
print factorial(6)
#First year programmer, studied C
def fact(x): #{
result = i = 1;
while (i <= x): #{
result *= i;
i += 1;
#}
return result;
#}
print(fact(6))
#First year programmer, SICP
@tailcall
def fact(x, acc=1):
if (x > 1): return (fact((x - 1), (acc * x)))
else: return acc
print(fact(6))
#First year programmer, Python
def Factorial(x):
res = 1
for i in xrange(2, x + 1):
res *= i
return res
print Factorial(6)
#Lazy Python programmer
def fact(x):
return x > 1 and x * fact(x - 1) or 1
print fact(6)
#Lazier Python programmer
f = lambda x: x and x * f(x - 1) or 1
print f(6)
#Python expert programmer
fact = lambda x: reduce(int.__mul__, xrange(2, x + 1), 1)
print fact(6)
#Python hacker
import sys
@tailcall
def fact(x, acc=1):
if x: return fact(x.__sub__(1), acc.__mul__(x))
return acc
sys.stdout.write(str(fact(6)) + '\n')
#EXPERT PROGRAMMER
from c_math import fact
print fact(6)
#BRITISH EXPERT PROGRAMMER
from c_maths import fact
print fact(6)
#Web designer
def factorial(x):
#-------------------------------------------------
#--- Code snippet from The Math Vault ---
#--- Calculate factorial (C) Arthur Smith 1999 ---
#-------------------------------------------------
result = str(1)
i = 1 #Thanks Adam
while i <= x:
#result = result * i #It's faster to use *=
#result = str(result * result + i)
#result = int(result *= i) #??????
result = str(int(result) * i)
#result = int(str(result) * i)
i = i + 1
return result
print factorial(6)
#Unix programmer
import os
def fact(x):
os.system('factorial ' + str(x))
fact(6)
#Windows programmer
NULL = None
def CalculateAndPrintFactorialEx(dwNumber,
hOutputDevice,
lpLparam,
lpWparam,
lpsscSecurity,
*dwReserved):
if lpsscSecurity != NULL:
return NULL #Not implemented
dwResult = dwCounter = 1
while dwCounter <= dwNumber:
dwResult *= dwCounter
dwCounter += 1
hOutputDevice.write(str(dwResult))
hOutputDevice.write('\n')
return 1
import sys
CalculateAndPrintFactorialEx(6, sys.stdout, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)
#Enterprise programmer
def new(cls, *args, **kwargs):
return cls(*args, **kwargs)
class Number(object):
pass
class IntegralNumber(int, Number):
def toInt(self):
return new (int, self)
class InternalBase(object):
def __init__(self, base):
self.base = base.toInt()
def getBase(self):
return new (IntegralNumber, self.base)
class MathematicsSystem(object):
def __init__(self, ibase):
Abstract
@classmethod
def getInstance(cls, ibase):
try:
cls.__instance
except AttributeError:
cls.__instance = new (cls, ibase)
return cls.__instance
class StandardMathematicsSystem(MathematicsSystem):
def __init__(self, ibase):
if ibase.getBase() != new (IntegralNumber, 2):
raise NotImplementedError
self.base = ibase.getBase()
def calculateFactorial(self, target):
result = new (IntegralNumber, 1)
i = new (IntegralNumber, 2)
while i <= target:
result = result * i
i = i + new (IntegralNumber, 1)
return result
print StandardMathematicsSystem.getInstance(new (InternalBase, new
(IntegralNumber, 2))).calculateFactorial(new (IntegralNumber, 6))
I've always thought it would be a really cool idea to create a C program that, through very well-controlled stack smashing, [b]arbitrarily[/b] jumps between functions. That is, it saves the start addresses of the functions in global variables and then hops to them, and by smashing the stack in exactly the right way it can do things like have main call function A call B which calls C, and then have C return directly to A, which then smashes itself into B, which then returns to main. Or better yet, entirely eschew the "return" operation in favor of stack smashing.
If there isn't anything stopping it from working, this would be a most ingenious idea to make obfuscated code.
And best of all it would be completely architecture-dependent.
One problem with FRAPS video is that even on fast computers, its often hard to get a full 30 FPS when recording video of games at high resolutions, especially for more recent games. Additionally, stutters can occur too. Since the framerate one gets is quite variable, this results in FRAPS duplicating frames relatively unpredictably and not in a manner that is easy to fix.
So I decided to use the MVTools AviSynth plugin to use motion compensation to interpolate the intermediate frames, replacing duplicate ones. Of course, it wasn't that easy: for one, MVTools crashed if it was used more than a few times in one script (nothing compared to the hundreds of times it might have to be called for one video!) because it was designed to not clear out its memory usage after being called, as in most cases MVTools is used as a single script-wide command rather than over and over in different specific cases.
Here was my solution:
[code]Minimal Cygwin environment
-----runs a shell script that
----------runs a loop that
---------------assembles an AviSynth script that
--------------------calls the main AviSynth script, trimmed to a small group of frames that
------------------------- calls the motion estimation function that
------------------------------creates the intermediate frames
---------------assembles a VirtualDub job script that
--------------------is used by VirtualDub to assemble a single AVI file
---------------assembles a part of an AviSynth script that assembles all of the AVI files created by the loop
----------runs the aforementioned AviSynth script to assemble all of the AVI files[/code]
If you want to see the program I can post it, but I think the program structure is self-explanatory.... ;)
(and yes, you can imagine how ugly the bash script is...)
@Valar said:
@Dark Shikari said:What about the bugs.eve-online.com section and so forth? I think every single subdomain, even the ones hosted on the same servers as another domain, has its own mirrored images.
Haha ;)
For the above poster, the forums were down for about 2 hours due to a DDOS attack. They were back up not long after.
@Valar said:
IBDS!
What about the bugs.eve-online.com section and so forth? I think every single subdomain, even the ones hosted on the same servers as another domain, has its own mirrored images.
@Daniel15 said:
@asuffield said:@Dark Shikari said:15. If you click reply before a thread is locked, you can post after
it is locked. So if you open 50 reply windows before a thread is
locked, you could theoretically bump a locked thread over and over!
Really silly, I think.I'm betting that you can post to any locked thread by manually constructing a suitable http POST.
I was thinking the exact same thing...
Yeah, the abuse possibilities are endless -.-
@Michael Buschbeck said:
@Dark Shikari said:Each subdomain has only one place to get its images; there are no "mirrors" per say.How do you know that the same image is actually fetched from physically distinct files for different subdomains?Each subdomain has all the images copied to a duplicate directory, so that if they want to change a single part of the interface, they have to duplicate it to all parts of the site by hand.
If, for the sake of the argument, image files indeed had to be physically copied to different places (or perhaps even different machines) for every one of the subdomains, how do you know this has to be done by hand after every change?
(That said, most of your other points seem valid.)
I talked with the web admin, who apparently was just hired to deal with this total mess.
Apparently the dev process was basically that there was no actual web admin--the other devs just hacked things onto the site when necessary, and nobody was in charge of the entire thing, resulting in a total mess of code.
They're considering rewriting the whole thing from scratch.
@tster said:
2. Mirroring images is not a WTF. CNN actually has all their images mirrored by a company with thousands of servers so that they can distribute the load dynamically for the large content. If the mirrors are down then that is just tough luck. This is NOT a bug
Not what I'm talking about.
Each subdomain has only one place to get its images; there are no "mirrors" per say.
Each subdomain has all the images copied to a duplicate directory, so that if they want to change a single part of the interface, they have to duplicate it to all parts of the site by hand.
This means even the most obscure subdomains of the site, from the shop to the bug report tool to the support section, all have the entire menu interface copied to them. But each section can only see its own images, so there is no extra reliability given by this, unlike Akamai/etc.
@Ice^^Heat said:
Works pretty nicely.
You can even see how far your skill is coming online.
Haven't played in awhile though, I guess I don't have the patience for MMOacRPG's.
I guess you posted before you saw my actual post. Would have edited it in the top post but the edit timer ran out.
My favorite bug is the "http://myeve.eve-online.com/ingameboard.asp?a=topic&threadID=509128&sid=144797075&sid=144797075&sid=144797075&sid=144797075&sid=144797075" one.
Also, 21 is supposed to say that the tag [ size=6 ] has to be ended by [/size=6]. The BBcode interpreter here got it.
1. When you edit a post, it decides what page of the thread to send
you back to by dividing the number of the post you were editing by 30,
the number of posts per page. However, it rounds, which means that if
you're editing post number 46 in a 50-post thread, you get sent to
page 3, which doesn't exist.
2. The links on the side, to the chronicles and the like, are often
broken. The reason for this is because when on the
myeve.eve-online.com section of the site, the images for the
chronicles and often the links are *MIRRORED* from the main site (thus
they go to myeve.eve-online.com, even when they're supposed to be on
www.eve-online.com), which is absurd; why copy a whole section of the
site to a different subdomain? The only plus of this is it makes it
easier for me to adblock them.
It seems from a quick search that ALL images on the myeve subdomain
are copied from the main page, which makes no sense and probably makes
maintenance a lot harder.
I got up to about number 24 when writing this and just realized that
EVERY SUBDOMAIN HAS ALL THE IMAGES MIRRORED FOR IT! Even
bugs.eve-online.com and store.eve-online.com have their own mirrored
images! This is nuts! Oh, and why do you use a seperate domain,
www.eve.is, for the hosting of the backstory articles and chronicles?
That doesn't seem to make sense either. Keep it all on one site!
3. When you click a smilie and the smilie is inserted into a post,
the cursor stays before the code, not after, so your smilies end up
going backwards if you keep inserting more.
4. The curse filter applies to words-within-words, so Sniggerdly, etc
get nerfed.
5. The server graph on the main page always shows zero at the 1 hour
mark, but an hour later, the 2 hour mark shows the correct amount.
9. Under Patches, the drop-down menu is almost never up to date and
shows "current" as one that isn't current. What is quite funny is the
"current client version" number right below the menu is different from
the one in the menu itself.
Additionally, the menu is not entirely sorted properly, the 25245
number is out of place.
11. When logged out with "remember me" turned on and clicking on
something that requires a login, such as posting a thread or going to
My Character, one of the following things happens. This is not
predictable.
a) You are logged in, but you go back to where you were before. If
you clicked reply to a thread, you don't end up replying. That is,
when the login page authenticates you, it redirects you to where you
were, rather than where you wanted to go.
b) You don't log in, but something like &sid=144797075 is added to
your URL. If you fail 4 times in a row, yes, your URL will look like:
Imagine what the code behind this site must be like. Oh, and many of these bugs have been known and not fixed for over 4 years.
This is an excerpt of an email I sent to the web developer after he asked me to document a "few" of the bugs on the forums. No pictures or code is necessary to realize how WTFy this is. By the way, their forums are made entirely in-house and lack tons of the most basic features, not surprisingly. But some of the bugs are incredibly hilarious, so I've excerpted the best ones from the email.
AGH--the forum apparently totally broke when I posted it here, so will get it back in a second.
Ogame's new portal, not surprisingly, broke tons of stuff.
Firefox no longer seems to remember usernames/passwords with it, and they also broke the FoxGame extension.
I notice there is an Avatar option, but there's no obvious statement on what the size limits are in either bytes or length/width--are these anywhere to be found, or would I have to guess?