Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment: Re:It's all about competition (Score 3, Informative) 208

by alantus (#49395203) Attached to: Comcast Planning 2Gbps Service, Starting With Atlanta

That is not true if you use Lenovo.

Lenovo doesn't want customers to be able to upgrade their laptops, so they implemented a list of approved mini-pci cards that can be used in them. It's called "bios whitelist".

Therefore if you have a Lenovo laptop you will have to change the whole laptop. Presumably to a different brand that doesn't pull this crap.

For those who do. Not.

Comment: Re: Now if they will sell them without MS Windows (Score 2) 161

by alantus (#49208915) Attached to: Ultralight Convertibles Approaching Desktop Performance

I just bought the Lenovo Edge Flex 15 and on Linux the Wifi card doesn't work, period. The only "fix" is to wait until 3.20 kernel adds support. Piece of shit OS or piece of shit Lenovo for not ensuring Linux compatibility? (Anyway, the keyboard sucks, so don't buy it)

You could upgrade the wifi card to something that works in Linux and get 802.11ac at the same time.

See page 39 of the hardware maintenance manual:
http://download.lenovo.com/con...

Just make sure you get a wifi card that is in the BIOS whitelist.
The BIOS whitelist is a list of PCI devices that have been approved by Lenovo for each laptop. If not in the list, the BIOS will refuse to boot.
This is just an imposed restriction by Lenovo, decent laptop makers don't do such a thing.

Comment: Re:Really? (Score 1) 215

by alantus (#49054921) Attached to: Japan Now Has More Car Charging Points Than Gas Stations

And yet I live in Tokyo and I have never seen a charging point there. Can anyone tell me where there is a public point?

Every Nissan dealer has at least one charging station.
You leave the car there while you go inside and enjoy free drinks, snacks, games for your kids, etc.
Of course, that is as long as you are a Nissan owner.

Comment: Re:Self-Inflicted Damage (Score 4, Insightful) 369

Just recently Israel was fighting against Hamas, who was launching rockets while hiding behind civilians that they were purporting to represent. They really don't care about the people they "represent".

Suicide terrorists are glad to blow themselves up if they take a few infidel's lives with them. They believe they get rewarded with a number of virgins in heaven.

El Che Guevara is hailed as a hero for dying for his cause, even when he was directly responsible for the killing and misery of so many, especially his own people. You can buy one of "Che" iconic t-shirts almost anywhere, they sell like hotcakes.

Comment: Skype disappointments (Score 2) 267

by alantus (#47619063) Attached to: Skype Blocks Customers Using OS-X 10.5.x and Earlier

Skype has been a continues stream of disappointments over the last few years.

First they started with this policy of taking away your credits if you haven't used them in a few years. They are still kind enough to let you "reactivate" them. This is like a bank taking your savings because you haven't used them in a while, but allowing you to get them back by dropping by. Its immoral and should be illegal.

Recently they also blocked access from the linux skype client 4.2.0.11 without any warning whatsoever, suddenly you just can't connect. And after updating to the latest version (4.3.0.37), it crashes every time. Turns out you have to do some changes to the sqlite database that holds your history (couldn't they do that automatically?).

Unfortunately opensource IM isn't much better. With so many usability issues, slow development (thinking about pidgin and gajim), and now Google turning their back on openness by disabling XMPP federation, the landscape of opensource IM looks gloomy.

Comment: Re:This is true (Score 2) 194

by alantus (#46316129) Attached to: Internet Shutdown Adds To Venezuela's Woes

How is it that Maduro and his allies can continue to persist with economic policies so patently stupid that even an undergraduate student of economics at any American or European university can predict and explain their inevitable failures?

Stupid or genius? Depends on the goal.
If its to improve the economy and life quality, plain stupid. If its to stay in power forever, genius!

1. Ruin the economy, make people poor and easy to manipulate
2. Create many social programs to "help" the poor, the poor depend on the state
3. Confiscate and nationalize everything, the state must run as much as possible, have everyone working for the state
4. Make it clear that they have to support and vote for you, or they lose their job and "hard earned" state benefits
...
6. Profit! You get all the votes from the poor, and most people are poor now :)

This strategy worked well for Chavez, and now his golem, Maduro.

Read this enlightening interview with the ex CEO of PDVSA (the oil company):
http://globovision.com/articul...
For the Spanish-impaired, a google translation is quite decent:
http://translate.google.com/tr...

Here is an interesting bit of this interview, just in case the page is removed (because Globovision is now controlled by the government):

"Look General, you still don't understand the revolution! Let me explain: This revolution aims to make a cultural change in the country, change the way of thinking and living, and those changes can only done being in power [in office]. So the most important thing is staying in power to make the change. We get the political floor from the poor: they are the ones who vote for us, that is the reason for our speech of defending the poor.
So, THE POOR MUST CONTINUE TO BE POOR, WE NEED THEM LIKE THAT, until we can achieve a cultural transformation. Later, we can talk about economy of production and wealth distribution. Meanwhile, we must keep them poor and with hope."

Comment: Re:My solution (Score 1) 243

My script is can save some I/O and cpu cycles, but has to keep more files open at a time (could run out of filedescriptors in extreme cases).
The script you describe must be shorter and easier to understand, but I would only use it for smaller files, where discarding duplicates before reading the whole file doesn't make a big difference.
The next step is to create some UI that allows deleting duplicates easily.

Comment: My solution (Score 2) 243

#!/usr/bin/perl
# $Id: findDups.pl 218 2014-01-24 01:04:52Z alan $
#
# Find duplicate files: for files of the same size compares md5 of successive chunks until they differ
#
use strict;
use warnings;
use Digest::MD5 qw(md5 md5_hex md5_base64);
use Fcntl;
use Cwd qw(realpath);

my $BUFFSIZE = 131072; # compare these many bytes at a time for files of same size

my %fileByName; # all files, name => size
my %fileBySize; # all files, size => [fname1, fname2, ...]
my %fileByHash; # only with duplicates, hash => [fname1, fname2, ...]

if ($#ARGV < 0) {
    print "Syntax: findDups.pl <file|dir> [...]\n";
    exit;
}

# treat params as files or dirs
foreach my $arg (@ARGV) {
    $arg = realpath($arg);
    if (-d $arg) {
        addDir($arg);
    } else {
        addFile($arg);
    }
}

# get filesize after adding dirs, to avoid more than one stat() per file in case of symlinks, duplicate dirs, etc
foreach my $fname (keys %fileByName) {
    $fileByName{$fname} = -s $fname;
}

# build hash of filesize => [ filename1, filename2, ...]
foreach my $fname (keys %fileByName) {
    push(@{$fileBySize{$fileByName{$fname}}}, $fname);
}

# for files of the same size: compare md5 of each successive chunk until there is a difference
foreach my $size (keys %fileBySize) {
    next if $#{$fileBySize{$size}} < 1; # skip filesizes array with just one file
    my %checking;
    foreach my $fname (@{$fileBySize{$size}}) {
        if (sysopen my $FH, $fname, O_RDONLY) {
            $checking{$fname}{fh} = $FH; # file handle
            $checking{$fname}{md5} = Digest::MD5->new;   # md5 object
        } else {
            warn "Error opening $fname: $!";
        }
    }
    my $read=0;
    while (($read < $size) && (keys %checking > 0)) {
        my $r;
        foreach my $fname (keys %checking) { # read buffer and update md5
            my $buffer;
            $r = sysread($checking{$fname}{fh}, $buffer, $BUFFSIZE);
            if (! defined($r)) {
                warn "Error reading from $fname: $!";
                close $checking{$fname}{fh};
                delete $checking{$fname};
            } else {
                $checking{$fname}{md5}->add($buffer);
            }
        }
        $read += $r;
        FILE1: foreach my $fname1 (keys %checking) { # remove files without dups
            my $duplicate = 0;
            FILE2: foreach my $fname2 (keys %checking) { # compare to each checking file
                next if $fname1 eq $fname2;
                if ($checking{$fname1}{md5}->clone->digest eq $checking{$fname2}{md5}->clone->digest) {
                    $duplicate = 1;
                    next FILE1; # skip to next file
                }
            }
            if (!$duplicate) { # remove unique file
                close $checking{$fname1}{fh};
                delete $checking{$fname1};
            }
        }
    }
    # these are duplicates, but there might be more than one group of md5 sums
    foreach my $fname (keys %checking) {
        close $checking{$fname}{fh};
        push(@{$fileByHash{$checking{$fname}{md5}->b64digest}}, $fname);
    }
}

# resultBySize: {fname}{hash} = array(file1,file2,...)
my %resultBySize;
foreach my $hash (keys %fileByHash) {
    $resultBySize{ $fileByName{${$fileByHash{$hash}}[0]} } {$hash} = $fileByHash{$hash};
}

# print report
foreach my $size (sort { $a <=> $b } keys %resultBySize) {
    foreach my $hash (keys %{$resultBySize{$size}}) {
        print "$size\t",join("\t", sort @{$resultBySize{$size}{$hash}}),"\n";
    }
}

# add directory's content (recursively)
sub addDir {
    my $dir = $_[0];

    if (!(opendir DIR, $dir)) {
        warn "Error opening $dir: $!";
        return;
    }
    my @dents = readdir(DIR);
    closedir(DIR);
    foreach my $dent (@dents) {
        next if ($dent eq '.' || $dent eq '..');
        $dent = $dir . '/' . $dent;
        if (-d $dent) {
            addDir($dent);
        } else {
            addFile($dent);
        }
    }
}

# add a file
sub addFile {
    $fileByName{$_[0]} = 0 if -f $_[0]; # only add regular files
}

Comment: Lenovo black friday "sale" (Score 3, Informative) 189

by alantus (#45546157) Attached to: Ask Slashdot: Top Black Friday Tech Picks?

I'm in the process of customizing/buying a Lenovo X230 for a family member, despite their BIOS whitelist shenanigans.

The Lenovo store always has a super special e-coupon discount, they are kind enough to give you the code right there in the checkout process.

A few days ago the laptop in my cart, with the coupon, was $1,037.
Now, after applying the new black friday e-coupon (10% discount), the price is $1,061.10

Perhaps I should buy it now, before they have an even better Christmas "sale".

At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer.

Working...