Today I had to look up all the various ways HTML might nominate a content-type and I found Character encodings in HTML over on Wikipedia which had all the answers…
Category Archives: Programming
Set the target frame of a form
Today I had to lookup how to set the target frame of a form.
Basically you set the ‘target’ attribute on the form to the name of the frame you want to target.
PHP DateInterval spec
It was a bit of a trick to find the DateInterval spec hidden away in the constructor doco, not the DateInterval class doco.
| Designator | Description |
|---|---|
| Y | years |
| M | months |
| D | days |
| W | weeks |
| H | hours |
| M | minutes |
| S | seconds |
PostgreSQL LIMIT and OFFSET
Today I learned about LIMIT and OFFSET in PostgreSQL, which differs slightly from its MySQL cousin.
jQuery document ready
I’m always forgetting the syntax for the jQuery ‘document ready’ event. Which is an embarrassment because it’s so simple:
$( document ).ready( handler ) $().ready( handler ) (this is not recommended) $( handler )
I used to use the $( document ).ready( handler ) syntax, but starting today I use the $( handler ) syntax.
Datepicker for Bootstrap
Today I used the Datepicker for Bootstrap. I grabbed the files from the CDN.
psql show tables
I wanted to know what the analogue for MySQL ‘show tables’ was in PostgreSQL, and I found the answer, use the information_schema, here:
mysql: SHOW TABLES postgresql: \d postgresql: SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'; mysql: SHOW DATABASES postgresql: \l postgresql: SELECT datname FROM pg_database; mysql: SHOW COLUMNS postgresql: \d table postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table'; mysql: DESCRIBE TABLE postgresql: \d+ table postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table';
HTML Singleton Tags
Found a list of HTML Singleton Tags, the tags that don’t require a closing tag.
PHP min
PHP call_user_func_array
Used call_user_func_array today, in Slib…