Just had an annoying 1/2 hour trying to get a properly formatted array to pass to a select control in CakePHP In my controller I'm trying to format an array with a Custom field $options = array( 'fields' => array( 'ReportDate.id', 'CONCAT( ReportDate.date, "...
James McDonald
CakePHP: Submit 0 instead of NULL for a database column that doesn’t allow NULLs
Problem: Error: SQLSTATE[23000]: Integrity constraint violation: 1048 column 'inventory_status_id' cannot be null Cakephp returns the above error when I'm trying to POST a removal of an integer from a field. Cause: The form was sending a blank value back to the...
Using gnubarcode to generate a GS1-128 barcode
Tried using the Code 128 options but couldn't get the right out put The trick I found is to use Code 128 raw mode. The caveat is it won't format a nice human readable text label for the barcode you will have to add that your self later (perhaps hack the postscript)....
What is the FNC1 character used for in a GS1 compliant barcode?
At work we ship pallets to supermarkets. Each pallet needs two bar codes A Serial Shipper Container Code (SSCC) and An item information bar code with GTIN-14 (Trade unit), Best before date, batch and quantity per pallet. On both the SSCC and item information bar code...
Implementing <<first and last>> links in cakephp pagination
I don't know why they don't include them by default but here is an example of how to add first and last links to your view. <?php echo $this->Paginator->first('<< first'); #add this echo $this->Paginator->prev('< ' . __('previous'), array(),...
Understanding the Difference between Windows Server User and Device Clients Access Licenses (CALs)
Every time I ask myself the question which type of CAL do I require? It always seems to take some thought in order to comprehend the difference.... Especially when you only ask the question every couple of years. But I found this picture which helps visualize the...
Don’t Buy USB Keys, SD Cards from Malaysian Street Vendors!
So while in Kuala Lumpur I bought a couple of 512GB USB Keys a 128GB USB/Mini-USB key and a 64GB micro SD card. At 10MR each they were less than a third of what you would pay in Australia for a 8GB USB key from Verbatim or Toshiba. After attempting to use them on both...
Ping Expired in Transit
You get this: C:\Users\lisa>ping www.2test.com Pinging 2test.com [63.95.218.111] with 32 bytes of data: Reply from 63.95.218.254: TTL expired in transit. Reply from 63.95.218.254: TTL expired in transit. Reply from 63.95.218.254: TTL expired in transit. Reply from...
Specifying custom page size with Ghostscript
you can't do the following because the custom page size won't exist on the system ps2ps -sPAPERSIZE=A4 input.ps output.ps This will work (this is 100x200 converted to points) ps2ps -dDEVICEWIDTHPOINTS=283.46 -dDEVICEHEIGHTPOINTS=567 test.ps output.ps Never mind this...
Export Mailboxes in Exchange 2010 Corrupted Items Work-a-round
# You get the mailbox sizes Get-MailboxStatistics -Server MYSBS2011SERVER | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size...
