Looking for large text files for testing compression in all sizes

*** Linux users only *** Arbitrarily large text files can be generated on Linux with the following command: tr -dc “A-Za-z 0-9” < /dev/urandom | fold -w100|head -n 100000 > bigfile.txt This command will generate a text file that will contain 100,000 lines of random text and look like this: NsQlhbisDW5JVlLSaZVtCLSUUrkBijbkc5f9gFFscDkoGnN0J6GgIFqdCLyhbdWLHxRVY8IwDCrWF555JeY0yD0GtgH21NotZAEe iWJR1A4 bxqq9VKKAzMJ0tW7TCOqNtMzVtPB6NrtCIg8NSmhrO7QjNcOzi4N b VGc0HB5HMNXdyEoWroU464ChM5R … Read more

Compression API on the iPhone

If you store the data for the conversations in an NSData object, the folks at the CocoaDev wiki have posted an NSData category that adds gzip and zlib compression / decompression as simple methods. These have worked well for me in my iPhone application. As the above link has gone dead while the CocoaDev wiki … Read more

How can I enable keep-alive?

Configure Apache KeepAlive settings Open up apache’s configuration file and look for the following settings. On Centos this file is called httpd.conf and is located in /etc/httpd/conf. The following settings are noteworthy: KeepAlive: Switches KeepAlive on or off. Put in “KeepAlive on” to turn it on and “KeepAlive off” to turn it off. MaxKeepAliveRequests: The … Read more

Is there a built-in zip library in .NET 3.5?

EDIT: See note in comments – SharpZipLib is now unmaintained, and you probably want to avoid it. Open source: #ZipLib I believe that the classes in the System.IO.Compression namespace are fine for compressing/decompressing a single stream of data, but there’s nothing built into the framework to cope with actual zip files. EDIT: As noted in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)