This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function isColorful($number) | |
{ | |
$number_as_string = strval($number); | |
$hash = array(); | |
$number_as_array = str_split($number); | |
foreach ($number_as_array as $int) | |
{ | |
if (isset($hash[strval($int)])) return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$addresses = array( 'AL' => '580 Cahaba Valley Rd,Pelham,AL,35124,US', | |
'AK' => '2601 E Tudor Rd,Anchorage,AK,99503,US', | |
'AZ' => '1635 E Camelback Rd,Phoenix,AZ,85016,US', | |
'AR' => '11500 W Markham St Rd,Little Rock,AR,72211,US', | |
'CA' => '801 E Cypress Ave,Redding,CA,96002,US', | |
'CO' => '8120 Voyager Pkwy,Colorado Springs,CO,80920,US', | |
'CT' => '783 E Main St,Meriden,CT,06450,US', | |
'DE' => '16758 S Dupont Hwy,Harrington,DE,19952,US', | |
'DC' => '2481-83 18th St NW,Washington,DC,20009,US', | |
'FL' => '2510 US Hwy 231,Cottondale,FL,32431,US', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function RotatePoint($sin,$cos,$x,$y) { | |
return array($x*$cos - $y*$sin, $y*$cos + $x*$sin); | |
} | |
function draw_boxes($image_name, $image_size, $boxes) | |
{ | |
$image = imagecreatetruecolor($image_size, $image_size); | |
imageantialias($image, true); | |
$white = imagecolorallocate($image, 255, 255, 255); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: text/xml\r\n"); | |
ob_start(); | |
// Sends SOAP response to SFDC | |
function respond($tf) { | |
print '<?xml version="1.0" encoding="UTF-8"?> | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<soapenv:Body> | |
<notifications xmlns="http://soap.sforce.com/2005/09/outbound"> |