Better HN
topnewbestaskshowjobs
Log inSign up

zxw

8 karma · joined Dec 1, 2010 (15y ago) · 12 submissions

Submissions

comment 13y ago · link · parent

10+ years here too. Recently forced to switch because it's gotten so bad. Maybe if they aren't working the render engine they will have more time to work on performance.

comment 14y ago · link · parent

Looks really nice, very readable. However, I want a python version!

comment 15y ago · link · parent

This is pretty cool but it needs to have a more distinctive style. Maybe the same as it is but green.

comment 15y ago · link · parent

1023 = 0b1111111111

comment 15y ago · link · parent

It's common for the free detectable version of popular trojans to be used as the advertisement for the paid undetectable one.

Looking at the poison ivy website they have a customer portal, so presumably this is how they did it.

There are also methods to pay without leaving a paper trail back to you (pre-paid cards I think).

Edit: It's also possible to modify detectable executables to make them undetectable if you don't want to pay. Virus scanners for the most part work by reading a few bytes from an executable at a particular point, hashing those bytes and if they match a known virus, report it as one. By finding those parts of the executable (there are often multiple signatures, and different vendors will have different signatures too) and modifying them slightly, the resultant hash will be different and the executable undetected.

comment 15y ago · link · parent

You can get the Kindle DX if you want a larger screen. I have one and am very happy with it.

http://www.amazon.com/dp/B002GYWHSQ/

comment 15y ago · link · parent

Yeh it's fairly slow going. I'm at 3,706,382,752 and am going to call it a day. Looks like the code works properly.

comment 15y ago · link · parent

Here is the code from the first test.[0] It increments a variable and prints a message if their is an inconsistency. I left it running till it reached 1,351,773,471 and didn't come up with any inconsistencies.

I then modified the test[1] to look for inconsistencies where they were most likely to be found, ie ±1 of 2n. I reached n being 1024 before python complained about a 'Result too large'.

[0] http://paste.pound-python.org/show/10067/

[1] http://paste.pound-python.org/show/10068/

Edit: just reread about the 1 in 2 billion chance, I'll leave the first test running longer to make sure.

comment 15y ago · link · parent

I'm not doing power == int(power) though which is what he warns against. I haven't done a lot of testing however as far I can tell it's working.

    >>> is_power_of_two(2 ** 31 - 1)
    False
    >>> is_power_of_two(2 ** 31)
    True
    >>> is_power_of_two(2 ** 31 + 1)
    False

    >>> is_power_of_two(2 ** 548 - 1)
    False
    >>> is_power_of_two(2 ** 548)
    True
    >>> is_power_of_two(2 ** 548 + 1)
    False

comment 15y ago · link · parent

Is there a reason this won't work? It's the most 'readable' way I could come up with.

    #(python code)
    def is_power_of_two(n):
        import math

        if n <= 0:
            return False

        power = round(math.log(n, 2))
        return 2 ** power == n