Showing entries 38321 to 38330 of 43769
« 10 Newer Entries | 10 Older Entries »
Yahoo! Pipes: Unlocking the Data Web

For far too long now RSS has been used in ways that don't really tap its true potential. Being able to syndicate my favorite headlines or blog posts is great. In fact, it helped to kick off a revolution in personal on-line publishing that is still growing and evolving. But I want so much more.

It's not for lack of vision. Back in 2005, Adam Bosworth painted a vision that eventually manifested itself as GData. I wrote about that a bit in Google's GData, MySQL, and the Future of on-line Databases.

It's not for lack of data either. You can get RSS output from lots of non-news and non-blog stuff. Everything from classifieds on eBay and …

[Read more]
Sieve of Eratosthenes

-- Sieve of Eratosthenes

-- The sieve of Eratosthenes is a simple algorithm to create a list of prime -- numbers up to some specified limit.

-- First, a list of all interger numbers from 2 up to the specified limit is -- created. Then, the algorithm repeats the following steps until the list -- is empty.

-- The smallest number of the remaining list is picked, it's a prime number. -- All multiples of this numbers are deleted from the list.

-- All the picked numbers are the primes numbers of the original range. DROP PROCEDURE IF EXISTS sieve; DELIMITER $$ CREATE PROCEDURE sieve (amount INT) BEGIN DECLARE cnt INT DEFAULT 2; DECLARE curprime INT; DECLARE lastprime INT DEFAULT 1; -- Temporary table speeds up operations DROP TABLE IF EXISTS mysieve; CREATE TABLE mysieve (nr MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=MEMORY; DROP TABLE IF EXISTS primes; CREATE TABLE primes (nr MEDIUMINT UNSIGNED NOT NULL) …

[Read more]
At the MySQL Developer Lead Meeting in Stockholm

















timeout units

Following a discussion on mythtv on #xfs (as you do), and a wondering of “hrrm… i wonder what unit that timeout is” with some NDB code I wish to make the following announcement:

All timeout values in NDB related APIs will now be given in centijiffies of the server system. For APIs that can talk to multiple hosts, it will be furlongs per fortnight.

I feel that having a consistent interface such as this will lead to much less confusion and better apps.

Modes are confusing

My mom's telephone comes with a speaker that allows you to make calls without using the receiver. Of course, there are two buttons to control the speaker. One to decrease and one to increase the volume. So far so good.

After a power outage, the phone decided to reset the volume for its ringtone. It was barely audible, so my mom went to fix that and pressed the volume-up button she found on the keypad. This was, however, the aforementioned control for the speaker — not the ringer.

To make adjusting the speaker volume even more comfortable, pressing the controls turns on the speaker giving direct audible feedback. Nice. It just happens to also pick up the line to provide any audible signal.

So instead of adjusting the ringtone's volume, my mom picked up the phone line with the speaker which she usually never, if ever, does. I even suspect her not knowing about the speaker function and all the things that come with it. …

[Read more]
Open Source and Hardware Support

By Allison Randal

A thoughtful post by chromatic on the problems and potential solutions around proprietary hardware and drivers with open source software:

However, it’s clear that the normal approach-that is, complaining in small groups and rewarding vendors with your business anyway-is not working. Nor does reverse engineering drivers address the root of the problem. It’s valuable in that it mitigates the damage, but it does little to prevent further problems.

Acknowledging vendors with the courage to deal with their customers respectfully and honestly may help. Free and open source software advocates can do a much better job of praising honest efforts to work with communities-and to encourage other companies to do so in a mutually …

[Read more]
A 'Simple' Protocol for Manual MySQL Slave Promotion to Master

We've been working on the design of a protocol which would enable promotion of a slave to a master in a MySQL replication cluster.

Right now, if a MySQL master fails, most people just deal with a temporary outage. They bring the box back up, run REPAIR TABLEs if necessary, and generally take a few hours of downtime.

Google, Flickr, and Friendster have protocols in place for handling master failure but for the most part these are undocumented.

One solution would be to use a system like DRDB to get a synchronous copy of the data into a backup DB. This would work of course but would require more hardware and a custom kernel.

You could also use a second master in multi-master replication but this would require more hardware as well and complicates matters now that you're using multi-master replication which has a few technical issues.

A simpler approach is to just take a slave and promote it to the master. …

[Read more]
New Layout

Enjoy!

Corrupted relay logs?

I just opened MySQL Bug #26123, to attempt to find out how many people are seeing this possible replication bug. A few Proven Scaling customers have seen the same bug, and I haven’t been able to reproduce it, so I opened a bug as a feeler. It appears to have something to do with using BLOB or TEXT fields in replication.

Are you seeing slaves stop with corrupted relay logs? Does restarting replication using CHANGE MASTER and the Exec_Master_Log_Pos from the stopped slave1 work just fine? Do the master’s binary logs look perfectly OK? Leave a comment on the bug.

1 This effectively forces the slave to re-download the exact same log events that it currently has in its relay logs. Since the corruption appears to happen either …

[Read more]
JLStringToBoolValueTranformer

If you use Cocoa Bindings and have an array of NSStrings where one entry controls a check box in your user interface, you need to provide a Value Transformer in Interface Builder.

I couldn't find one, so I wrote one. The core are two methods:


- (id)transformedValue:(id)value
{
  if(value 
  && [[NSString stringWithString:value] 
  isEqualToString:@"1"]) {
    return [NSNumber numberWithBool:YES];
  } else {
    return [NSNumber numberWithBool:NO];
  }
}

- (id)reverseTransformedValue:(id)value
{
  if([value boolValue] == YES) {
    return [NSString stringWithString:@"1"];
  } else {
    return [NSString stringWithString:@"0"];
  }
}

They convert an NSString to a BOOL and vice versa. This is not exactly true, as these functions …

[Read more]
Showing entries 38321 to 38330 of 43769
« 10 Newer Entries | 10 Older Entries »