Italian quadruped robot goes for a walk

    hyq robot outdoor test

    HyQ robot outdoor test (credit: Italian Institute of Technology)

    Researchers from the Italian Institute of Technology took their quadruped robot HyQ for a test run outside the lab for the first time to test new tricks HyQ has learned, including the ability to trot over obstacles without falling, IEET Spectrum Automaton reports

    The robot is still a strange headless creature, and though a sensor head is in the works, this quadruped might get even weirder with a new hardware addition: arms.

    The goal: an autonomous, versatile machine capable of running, jumping, and negotiating rough terrain that could find applications in search-and-rescue operations and exploratory missions.

Electricity Generated from Viruses

    Berkeley Lab has a new approach that is a promising first step toward the development of tiny devices that harvest electrical energy from everyday tasks.

    Imagine charging your phone as you walk, thanks to a paper-thin generator embedded in the sole of your shoe. This futuristic scenario is now a little closer to reality. Scientists from the U.S. Department of Energy’s Lawrence Berkeley National Laboratory (Berkeley Lab) have developed a way to generate power using harmless viruses that convert mechanical energy into electricity.

    The scientists tested their approach by creating a generator that produces enough current to operate a small liquid-crystal display. It works by tapping a finger on a postage stamp-sized electrode coated with specially engineered viruses. The viruses convert the force of the tap into an electric charge.

    Their generator is the first to produce electricity by harnessing the piezoelectric properties of a biological material. Piezoelectricity is the accumulation of a charge in a solid in response to mechanical stress.



    Read more »

Quick and Dirty REST Security (or Hashes For All!) - blog.phpdeveloper.org » PHP

    So in working up a new RESTful service I’ve been tinkering with, I wanted to provide some kind of “authentication” system for it. I started to look into OAuth, but got a bit overwhelmed by everything that was involved with it. Looking for something a bit more lightweight (and simpler to implement a bit more quickly) I came across this older article with a suggestion of a private key/hash combination. I figured that could do the job nicely for a first shot, so I set to implementing it.

    On the Server Side

    I’m using the FuelPHP framework for this one, but that’s really only giving me a structure to work in and pull the request information from. This would work in most major frameworks (and even outside of one if you you’re a “do it my way” kind of developer). First off, let’s start with the controller side:

    <?php
    class Controller_User extends Controller_Rest
    {
        protected function validateHash()
        {
            $request = file_get_contents('php://input');
            $requestHeaders = apache_request_headers();
    
            if (!isset($requestHeaders['X-Auth']) || !isset($requestHeaders['X-Auth-Hash'])) {
                $this->response('fail!',401);
            } else {
                // we have the headers - let's match!
                $user = Model_User::find()->where('public_key',$requestHeaders['X-Auth'])->get_one();
    
                if ($user !== null) {
                    $hash = hash_hmac('sha256',$request,$user->private_key);
                    return ($hash == $requestHeaders['X-Auth-Hash']) ? true : false;
                } else {
                    return false;
                }
            }
        }
    
        public function post_index()
        {
            // return the user details here....
        }
    
        public function router($resource, array $arguments)
        {
            if ($this->validateHash() == false) {
                $resource = 'error';
                $arguments = array('Not Authorized',401);
            }
    
            parent::router($resource,$arguments);
        }
    }
    ?>
    

    There’s a lot going on here, so let me walk you through each of the steps:

    1. First off, we’re making a RESTful service, so we’re going to extend the Controller_Rest that Fuel comes with. It has some handy special routing. Our POST request in the example below would try to hit the “post_index” method and have its hashes checked in the process.
    2. Next up is the “validateHash” method – this is where the hard work happens:
      • The request and headers are read into variables for easier use ($request and $requestHeaders).
      • It then checks to be sure that both of our required headers are set (X-Auth and X-Auth-Hash). There’s nothing magical about these header names, so they can be switched out depending on need and naming preference.
      • If they’re there, the next step is to find the user based on the public key that was sent. This value is okay to openly share because, without the private key to correctly hash the data, your requests will fail.
      • The hash_hmac function is then used (with the “sha256″ hash type) to regenerate the hash off of the contents of the request and the private key on the found user.
    3. If all goes well, the request continues on and the “post_index” method is used. If it fails, however, the check in the “route” method of the controller makes a switch. It changes the currently requested resource to “/error/index” instead of what the user wants. This seamlessly shows the user a “Not Authorized” error message (401) if the hash checking fails.

    A Client Example

    Now, to help make it a bit clearer, here’s an example little script showing a curl request using the hashes:

    <?php
    
    $privateKey = 'caa68fb2160b428bd1e7d78fcf0ce2d5';
    $publicKey  = '01fa456c4e2a2bc13e5c0c4977297fbb';
    
    $data = '{"username":"happyFunBall"}';
    $hash = hash_hmac('sha256',$data,$privateKey);
    
    $headers = array(
        'X-Auth: '.$publicKey,
        'X-Auth-Hash: '.$hash
    );
    
    $ch = curl_init('http://mysite.localhost:8080/user');
    
    curl_setopt($ch,CURLOPT_HEADER,true);
    curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
    curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    
    $result = curl_exec($ch);
    curl_close($ch);
    
    print_r($result);
    echo "\n\n";
    ?>
    

    You can see that both the public and private keys are specified (but on the PHP side, not visible to the user) and are sent as the “X-Auth*” headers as a part of the request. In this case, we’re POSTing to the &

    Truncated by Planet PHP, read more at the original (another 733 bytes)

Project Hyperion: The Hollow Asteroid Starship – Dissemination of an Idea

    David Hardy Astreroid Starship

    Asteroid starship arriving at an alien world by David Hardy, from [4]

    Source: http://img535.imageshack.us/img535/6797/asteroid2.jpg

    A large space mirror heats up an asteroid, slowly melting it. Water, which was injected into the center of the body expands, blows up the melted material,  creating the shape of a balloon. After cooling down, rotation is induced into the hollow body creating artificial gravity. An artificial fusion Sun brings daylight to the dark interior.  A team of bio-life-support system experts, urban planners, and ecologists starts to create an artificial world inside the balloon, preparing it for the first settlers. The small world is then provided with a propulsion system and launched to one of the next stars or used as a space colony.

     

    Gatland - Astroid starship

    Asteroid starship construction from [3]

    Source: http://thewesternlines.files.wordpress.com/2008/02/page883.jpg

    Dandridge Cole imagined this vision of constructing a manned starship / space colony in the 60s in his book “Islands in Space: The Challenge of the Planetoids” [1]. His concept was picked up several times, for example in the book “Macrolife” by George Zebrowski [2]. One of the most popular accounts to the concept was made in the book “The World of the Future – Star Travel” by Kenneth Gatland and David Jefferis [3]. David Hardy also imagined how such a concept might look like in Carl Sagan’s well-known “Pale Blue Dot” [4]. Gerard O’Neill himself takes account on Cole when he introduces his idea of space colonies, although his colonies are made largely of material from the Moon [5].

    Although the original concept of directly melting an asteroid is probably not very attractive, Cole created an important link between artificial space colonies and manned interstellar flight. This link was later recited by Gerard O’Neill and Gregory Matloff [5, 6]. Both see space colonies as a precursor to generation and colony ships, in order to gain experience with sustaining life in space over extended periods of time. Whether or not such a logical link between space colonies and manned interstellar flight exists, is currently assessed within Project Hyperion. This is a vital issue as its clarification helps to identify technology paths to realize manned interstellar flight.

     

    [1] Cole, D. M., and Cox, D. W. “Islands in Space: The Challenge of the Planetoids”. Philadelphia, Chilton Books, 1964.  

    [2] Zebrowski, G., “Macrolife: A Mobile Utopia”. Harper & Row, 1st edition, 1979.

    [3] Gatland, K., Jefferis, D., “World of the Future – Star Travel”, Usborne Publishing, 1979.

    [4] Sagan, C., “Pale Blue Dot: A Vision of the Human Future in Space”, Random House, 1st edition, 1994.

    [5] O’Neill, G.K., “The Colonisation of Space”, Physics Today, 27, No. 9, 32-40, September 1974.

    [6] Matloff, G.L., “Utilization of O’Neill’s Model I Lagrange Point Colony as an Interstellar Ark”, Journal of the British Interplanetary Society, Vol. 29, pp. 775-785, 1976.

Could a Single Pill Save Your Marriage?

    PillmarriageGeorge Dvorsky in io9:

    Your relationship is on the rocks. Begrudgingly, you and your significant other visit a marriage counselor in the hopes that there's still something left to salvage in your relationship. You both spill your guts and admit that the love is gone. The counselor listens attentively, nodding her head every now and then in complete understanding. At the end of the session she offers the two of you some practical words of advice and sees you on your way. Oh, but before you leave she fills out a prescription for the two of you. Your marriage, it would seem, has been placed on meds.

    Now, as messed up as this scenario might seem, this could very well be the future of marriage counseling. At least that's what Oxford neuroethicists Julian Savulescu and Anders Sandberg believe. In their paper, "Neuroenhancement of Love and Marriage: The Chemicals Between Us," they argue that such a possibility awaits us in the not-too-distant future, and that a kind of ‘love potion' could eventually be developed to strengthen pair bonding. In fact, most of the compounds required to make such a concoction are already within our grasp. It's just a matter of doing it.

    It's no secret that divorce rates are going up. Most people would agree that the end of a relationship is a tragic and undesirable thing. Modern couples tend to break-up between the five to nine year mark, a time when the initial honeymoon phase is long gone and the hard realities of managing a longterm relationship really start to kick in.

    And while economic and social factors can often play a part in the disintegration of a marriage, neuroscience is increasingly showing that that love is in the brain.

Use an Alum Bar to Soothe Razor Burn and Seal Cuts [Shaving]

    Next time you cut yourself shaving or need to alleviate razor burn, try an old-fashioned barber trick and reach for an alum bar. More »


Breakthrough might lead to artificial vision

    An international research breakthrough with bees means machines might soon be able to see almost as well as humans.

    The Australian and French research shows that honeybees use multiple rules to solve complex visual problems.