29 May 2008

May 29th, 2008

i) Decline Chest Press 12/20 8/30 5a/40 10/20
ii) Incline Chest Press 7/10 6+1a/15 3+2a/17.5
iii) Bench Press 5+1a/20 2+1a/25 2+2a/20
iv) Olympic Bar Curl 8 6 6
--

Permalink

In defense of manners

May 18th, 2008

A friend was describing a slightly awkward incident in his flat. His flatmate had brought home a new "special" friend. As this women entered the abode my friend was hoping she'd say "hello" or at least some form of acknowledgment. She did not.

More recently I had a friend around to watch TV. A fairly casual affair. As I sat in my lounge a sibling entered. As we sat there - I was struck by the fact that neither of them said hello. It's not like this was their first meeting - but more so - they were in some kind of stale mate. Neither willing to lay down the first 'hello'.

What happened to courtesy? to manners?

I was raised to at the very least say hello when someone's in the same space as me. It's not invasive, nor shallow it's just a friendly acknowledgment of another human being.

I'm not suggesting that we become BFF (best friends forever) with everyone that enters our home. That's both pointless and disingenuous. But a little nod, eye-brow raise, smile, wink, handshake ; hell even just saying "hello".

In this day in age I think these things matter. It says something about how we interact and how we respect one another. The world increasingly is becoming a sterile and disconnected place; we walk with our iPods, we prefer emails and text messaging to actual conversation. We some how decided that we don't want to bother other people or invade their space by simply saying, "hello" - after all - we respect privacy - yet we seem so keen to share details (without concern for privacy) on social networking (bebo, facebook, etc) sites.

Permalink

SED and chaging dates

May 12th, 2008

Sed's most obvious functions is using regular expressions for substitutions ( see Wikipedia's article on sed).

The problem: I have a csv file that I want to use load local data infile to load the contents into a mySQL table, but the date field is
DD/MM/YYYY HH:MM:SS

mySQL's date and type types use DATETIME as YYYY-MM-DD HH:MM:SS

What to do? cut? paste?
Sed !

sed -re 's|([0-9]+)/([0-9]+)/([0-9]+)|\3-\2-\1|'

Actual usage using redirect in and out

Permalink

mySQL fun

May 8th, 2008

Finding A - (A union B)

So in real terms lets say you have two table like:


tbl_1
name, mobile, colour
bob, 123, red
mary,456 , blue
joss, 789, grey
buffy, 8910, purple

and


tbl_2
mobile, phoneInsured
123, Y
8910, Y

Finding the phones with Insurance is easy

select * from tbl_1, tbl_2 where tbl_1.mobile=tbl_2.mobile;

But how to find the phones that aren't insured, given tbl__2 has only the phones with insurance? Sadly select * from tbl_1, tbl_2 where tbl_1.mobile!=tbl_2.mobile; doesn't work - it gives you the cartesian product of the query.

Here's what you're looking for:


select A.*
from A
left join B
on B.id=A.id
where B.id is null

Conceptually:

a {b c d e }
b {e f g j }

the above query should return a - (a union b)

e.g.
{b c d}

Permalink

29.04.08

May 2nd, 2008

i) Decline Chest Press 12/20 8/30 5a/40 10/20
ii) Incline Chest Press 7/10 6+1a/15 3+2a/17.5
iii) Bench Press 5+1a/20 2+1a/25 2+2a/20
iv) Olympic Bar Curl 8 6 6
--

Permalink

:: Next Page >>

All of it plus the kitchen sink

| Next >

Search

Linkblog

Other Blogs

  • Egglestone

    Robert Egglestone - everything guru and text-aholic.

    Permalink
  • insequential

    Hugh's Blog - insequential

    Permalink
  • Jas

    "Mental Mind Map" of Jas

    Permalink
  • Mr. Carter

    Robert Carter, ammego and web guy.

    Permalink
  • Seat Guru

    Quite a cool little site that would help with planning trips :)

    Permalink

Choose skin

Misc

Syndicate this blog XML

What is RSS?

powered by
b2evolution