From some further reading, the Mac implementation of malloc() performs allocations for multiples of 16 bytes, for both reducing the overhead by tracking smaller amounts of memory blocks and aligning memory to 16 byte boundaries for SSE instructions (used for floating point operations). That coupled with alignments for unknown types, mentioned earlier, I think I have the correct understanding.

malloc() is required to give you a block with suitable alignment for any type. That's why it can return a pointer to void which you can then assign to any object pointer type. On your system aligning to the largest scalar type just happens to be the best (hopefully) way to meet that requirement.

You might need to expand a little on that, I can see what you mean by it, but there is still something I'm missing. If I requested 8 bytes of memory, I wouldn't go and try to stick 16 bytes into the block I was just given, so what purpose does it have?

malloc() returns a block of memory AT LEAST as large as you requested, which means it could be larger.

I've gone down the route of finding out why and read that malloc will return addresses aligned to the largest possible data type (something to do with safety of returned addresses), which on this system is 16 bytes (long double). Not sure why though, yet...

I'm on the latest Mac hardware/software with LLVM 4.2

tick is another typedef'd structure, after malloc'ing both using sizeof(), the memory footprint is:

dataPoint =
303E100001000000 tickData
0000000000000000 previousDataPoint (uninitialised)
0000000000000000 nextDataPoint (uninitialised)
0000000000000000 <-- unused padding

tick = 
8711259C34010000 unsigned long long
8C101E6D1CB1F43F double
191C25AFCEB1F43F double
0000000000000000 <-- unused padding (again)

Each block is 1 word, or 8 bytes.

I'll fire up the Raspberry Pi and see what happens on that...

Take the following C structure:

typedef struct dataPoint {
    tick * tickData;
    struct dataPoint * previousDataPoint;
    struct dataPoint * nextDataPoint;
} dataPoint;

Compiling on a 64-bit system with 8-byte words, this structure takes up 24 bytes (3 words) of memory.
24 % 8 = 0 ... so it is word aligned, yet for each structure created, it uses 4 words, why is this?

I am aware padding and alignment is done for performance reasons, but does anyone know the specific reason for this case, as it is already word aligned, perhaps CPU cache line boundaries?

I handle my email myself with open-source IMAP implementations, at work we have IBM Domino, I'm trying to get a feel for what yourself/businesses (you know of) use? Not so much why, but just to see rough market usage...


1500+ lines in a few (2) days...

Either that includes a hell of lot of blank lines, copying and pasting, or there was no testing because that's just daft!

An argument is also called a parameter, if you've heard that before? An argument is a piece of data passed to a function to be used within that function. In the case of printf, the format string, the first argument, specifies three '%d' markers, which indicate to printf that there will be three arguments to follow, and these should be placed at these markers in the order they were supplied in the function.

Ah see, you want them to absorb the charges, the $1.50 throws the equation I know off :/ ... if they applied it before, then it would have been ok.

I'm going to go on the basis I have the right idea for what you want, the calculation is as follows:

You want the fee (referred to as $outcome, what you get) to equal a certain amount, lets take your example for $2, so...

(($gross x 0.065) + 1.5) must equal $2 ... and you want to know what $gross is? so you would do the following:

(2 - 1.5) / 0.065 = 7.6923... - That's what you have to charge your customer, in order for you to receive $2 in fees.

Now, for that to work on any calculation with pluggable values in PHP:

$outcome = 2;
$charge = 1.5;
$processing_fee = 0.065;

$gross = ($outcome - $charge) / $processing_fee;

// Gross is now 7.6923...

Oh my god, there is something for everything out there!

It's possible, I think whoever has the best service at the right time will come out on top, think about Instagram, people seem to love taking pictures these days and that grew like mad. So in a few years there will be a new craze, Google might capture it first and succeed, or Facebook users get bored and migrate.

Read the schema (nutrition for example):

Actual example of nutrtion data, look at source:

Look for itemprop, itemscope and itemtype, that's my site so if you have a specific question, then ask...

As for SEO and SERP, it allows the search engines (and other things) to understand your page better, which could convert to being a better served result than a competitor.

Thanks @AleMonteiro, the last link explained it perfectly, well it stated what you said too:

If you don't declare a width, and the box has static or relative positioning, the width will remain 100% in width and the padding and border will push inwards instead of outward. But if you explicitly set the width of the box to be 100%, the padding will push the box outward as normal.

Learn something new everyday...

<div class="parent">
    <div class="child"></div>

/* Final Width: 200px */
div.parent {
    width: 200px;

/* Final Width: 202px (with border) */
div.child {
    width: 100%;
    border: 1px solid #000000;

/* Final Width: 200px (with border) */
div.child {
    /* Width Inherited -- Assumed as 200px? */
    border: 1px solid #000000;

Why is it that works the way it does, when you would think it wouldn't, is it standard or specific to browser implementation?

So much of SEO advice around the internet, well what I've found anyway, is based on bloggers or people with content heavy sites. This is making it a little hard to find what I'm after.

I can't see websites like Amazon, eBay, DaniWeb even, following this kind of SEO.

So the question is, how do websites that provide more of a service, particularly sites where the user comes to do something instead of reading something, perform SEO (offsite) and marketing?

Can anyone share some knowledge (perhaps Dani herself?), and try to avoid mentioning paid advertising please -- it's something I want to avoid.

raajvengadesan commented: 2 +0

Anyone know what SEO is? Don't think it was mentioned... ;)

Field defined as DECIMAL(5,2), trying to INSERT (250.00).

When query is performed remotely to DB server, it fails with 'Out of range value for column...', when query is performed locally on the DB server, the query works. The query works remotely when the value being inserted is 226.24 (yes, that specific) or less. The query also works when inserting into a duplicate database on another machine locally.

Any ideas...?

@Smeagel13 its localhost and change!

Are you saying you've tried both? Have you checked to make sure the database exists (wasn't deleted accidentally) and also make sure in the connection call the correct database is requested, no spelling mistakes.

look in the user table within the mysql database ...

is access defined 'user-xxx'@'localhost' or 'user-xxx'@''

"If you specify a host name when trying to connect, but get an error message where the host name is not shown or is an IP address, it means that the MySQL server got an error when trying to resolve the IP address of the client host to a name."

You can use server side scripting to write your own processing function, just look at each request's user agent, not all requests will have one but Google will be nice and always provide one. So, look at the request ($_SERVER variables in PHP) and check to see if the user agent is Google and if it is, record it.

Currently Google's user agent string is: Mozilla/5.0 (compatible; Googlebot/2.1; +

A simpler solution would be to export from Excel as a CSV and then use PHP's buitlin functions to parse a CSV file :

Shouldn't that be part of your learning, researching and determining which database to use? ;)

But, looking at your goals, it would be simple to keep the database in one place and avoid offline mode, unless you have the database stored locally within the application depending on what it is you actually want to store and how much... not sure what admin rights you are after on a server but not locally.

You need to pass the original search query on to the product page, either with the URL or POST data depending on how you search for things currently. Once on the product page, use the original search term to re-run the query excluding the currently displayed item.

The first thing that stands out is :

if(!$insert = mysql_query("INSERT INTO VALUES(NULL, '', '$image', '$image_full_name', '', '', '', '')"))

INSERT INTO ... what, you've forgotten the table name.

Should be INSERT INTO tbl_name VALUES...

Also, consider using some other syntax to keep it a little cleaner (in my eyes), get rid of the empty values, e.g.

INSERT INTO tbl_name (User_ID, Image_File, Name) VALUES (23, 'TMP.JPG', 'Monkey');

That way you only insert what you need to, but make sure you have defaults set in your table denfinitions or things unexpected may happen.

Do you get any output, the 'dead' statement, or none at all?

What's in include("connect.php"); ?

If you don't get any output at all, then perhaps something in there causes the script to finish.

{ ... }

... needs to be ...

{ ... }

Also answered your other thread, same reason and solution.

With the looks of it, you would expect to see the $_POST['submit'] variable set in your example above, but perhaps the 'type="submit"' causes it to be unset or unregistered by the browser (it doesn't send it), but I'm not 100% sure on that...

Wrong use of if(isset($_POST['submit'])) here, what you're looking for is:


    if($_SERVER['REQUEST_METHOD'] == 'POST') {

        // Validate and Execute Password Change Code ...

    } else {

        // Display Form



Hi-Lo Game, Prime Number Generator, Calculator ...

It was the first thing that popped into my head...