Question: [In this plunk](http://plnkr.co/edit/ovhWJdzoNw9vZ2EzcZ1r?p=preview) I have a jQuery UI animation (slideDown) that displays a div. The div also has a `margin-top:100px` attribute to show it `100px` below the top margin.

The problem is that when the animation starts, it disregards the margin, and it is only applied after the animation ends. I need the margin applied at the beginning of the animation. How to accomplish this?

HTML

```
<body style="background-color:blue">
   <div id="div1" style="background-color:orange;width:180px;height:40px;margin-top:100px"></div>
</body>

```

Javascript

```
 $(function() {
    var div1 = $('#div1');
    div1.hide();

    setTimeout(function(){
       div1.slideDown();
    }, 1000);

 })

```

Answer: 
Thanks to all...
Actually I've found a solution myself:

```
  char hex_str[100] = "0x01 0x03 0x04 0x0A";
  long data[4];
  dword pos = 0;

  pos = strtol(hex_str, pos, data[0]);
  pos = strtol(hex_str, pos, data[1]);
  pos = strtol(hex_str, pos, data[2]);
  pos = strtol(hex_str, pos, data[3]);

  write("0x%02x,0x%02x,0x%02x, 0x%02x", data[0], data[1], data[2], data[3]);

```

Now it's a simple cast: `(byte) data[0]`
We can use `sscanf()` to convert the numbers to `unsigned char`. In a loop, we'll need to also use a `%n` conversion to determine the reading position for the next iteration.

Here's a simple example (in real life, you'll need some range checking to make sure you don't overrun the output buffer):

```
#include <stdio.h>

int main(void)
{
    const char hex_str[100] = "0x01, 0x03, 0x04, 0x0A";
    unsigned char bytes[4];

    {
        int position;
        unsigned char *b = bytes;

        for (const char *input = hex_str;  sscanf(input, "%hhi, %n", b, &position) == 1;  ++b) {
            input += position;
        }
    }

    /* prove we did it */
    for (size_t i = 0;  i < sizeof bytes;  ++i) {
        printf("%hhu ", bytes[i]);
    }
    puts("");
}

```