Metadata in PDF files can be stored in at least two places:
- the Info Dictionary, a limited set of key/value pairs
- XMP packets, which contain RDF statements expressed as XML
<?php | |
//Dynamically resize images | |
function thumb_create($file, $width , $height ) { | |
try | |
{ | |
/*** the image file ***/ | |
$image = $file; | |
/*** a new imagick object ***/ |
<?php | |
function get_ip_address() { | |
$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'); | |
foreach ($ip_keys as $key) { | |
if (array_key_exists($key, $_SERVER) === true) { | |
foreach (explode(',', $_SERVER[$key]) as $ip) { | |
// trim for safety measures | |
$ip = trim($ip); | |
// attempt to validate IP | |
if (validate_ip($ip)) { |
Version = 4 | |
Booleans = {'caretLineVisible': True, 'preferFixed': True, 'useSelFore': True} | |
CommonStyles = {'attribute name': {'fore': 7872391}, | |
'attribute value': {'fore': 3100463}, | |
'bracebad': {'back': 65535, 'bold': 1, 'fore': 16777215}, | |
'bracehighlight': {'bold': 1, 'fore': 16777215}, | |
'classes': {'bold': True, 'fore': 3272098}, | |
'comments': {'fore': 7301991, 'italic': 1}, |
require 'rubygems' | |
require 'mechanize' | |
FIRST_NAME = 'FIRST_NAME' | |
LAST_NAME = 'LAST_NAME' | |
PHONE = 'PHONE' | |
EMAIL = '[email protected]' | |
PARTY_SIZE = 2 | |
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' } |
find . -type f -name "* conflicted copy*" -exec rm -f {} \; | |
awk '!/conflicted/' .git/packed-refs > temp && mv temp .git/packed-refs |
Imitate hand-drawn (imperfect) circles using cubic Bézier segments, based on a Bézier approximation to a perfect circle. TLDR: a good approximation to a quarter circle of unit radius is a cubic Bézier curve with control points P0 = (0,1), P1 = (c,1), P2 = (1,c), P3 = (1,0) where c = 0.551915024494. By varying the points in a sensible way, we can do a good impression of hand-drawn circles.
.DS_Store |