IP to Numeric

To followup on my previous post about doing ip to numeric address conversions. It turns out that the sql functions I linked to didn’t quite work, they were written with the assumption that you were storing the data as an INT rather than a BIGINT, so for values over 127.0.0.1 it would store the number as a negative number in the database. My source data uses bigint so I got errors back when feeding in data that overflowed the int.

If you are interested I have included the edited functions after the link

Continue reading IP to Numeric

Torn

Knowing the way things are, you have probably already seen this, but incase you haven’t here is Torn from the secret policeman’s ball

(click through for the embedded you tube video if your rss reader doesn’t show you the window)

MS SQL numeric to ip

I love the fact that I know SQL and can go against the database directly instead of having to accept someone elses preconceived ideas of what kind of data I need.

I needed to find out all hits in a database from a specific range of IP addresses range. the table stores the IP’s in a numeric form which is a no brainer on mysql you just use inet_ntoa and inet_atoa to convert back and forward, but Microsoft SQL Server (mssql) doesn’t support that so a little googling later I came up with this page, which has some stored procedures for doing the convertion, now I am just waiting for the database to come back with the data. SWEET

New Laptop

So HY was kind enough to bring my new laptop home with her yesterday. After the initial unboxing and savoring that new computer smell I plugged it in. I decided to transfer all my files from my old 12 inch Powerbook since it was rebuilt a few months back and the machine will become a ‘public’ computer for anyone who needs it at the house. After waiting and cursing apple for lying about how long it would take all my files and settings were transferred over. From a normal user experience this is great since it gets you up and running very quickly and everything is set up exactly as you are used to….. but….. I am feel I am missing the ritual that you get when you defile a fresh install of an OS by tweaking, install and customizing till you happy with it.

For a mac my standard install list would be
Firefox (get the beta of V3)
Quicksilver
Adium
Microsoft RDC client (get the new beta version)
Chicken of VNC
Dev Tools
Darwin Ports
For intel macs I would also add vmware fusion (need to try out virtual box)

Leena and Gregs Wedding

If you have been following my twitter feed you would know i was at an Indian Wedding this weekend in Albany NY. Below are a couple of the shots that caught my eye when doing a first scan of the photos.

This is the first real test of my new DSLR and I learned a few things about the capabilities. I wasn’t very happy with the built in flash, I really need to upgrade to an SB 800, in large rooms it would over expose the foreground and you would get bright spots on reflective surfaces. For a lot of the flash shots I dropped the flash exposure down a little to compensate. For the non flash shots I was shooting at 1600 iso which has its draw backs, images are a little softer and I still ended up with a number of shots with slow exposure so they have blurry hand movements. Shooting without the flash meant that the photos have an orange glow from the indoor lighting which I actually I liked for the wedding since i gives a warm feel to the photos. I need to work on getting my usable shot count up higher, i am still wasting some shots because the shutter speed is too slow.

Pedestrian Safety in the city

The washington post has an article on improving pedestrian safety in the city, but they only hint at one very easy thing that could make the urban D.C. or any other cities streets safer for pedestrians. The article suggests “Give pedestrians a few seconds head start at stop lights, before cars are given a green signal.” This is a good start but what we really need is to separate the pedestrian walk signal from the traffics green light. As a driver when I see red I stop then look to see if it is safe to do a turn on red, when I see green I have been programmed to go. The same thing is true for pedestrians when you see stop you don’t cross when you see walk you walk. It is counter intuitive for a driver or pedestrian to see a green light or walk sign then have to proceed with caution because pedestrian or car might be crossing into your path. Every day I see drivers sitting waiting a green light while pedestrians are crossing, stressing out the drivers trying to make their turn before the light turns and pedestrians scared that they are going to be run over by aggressive drivers.

We need to separate the pedestrian crossing signal with green lights. The walk sign should only be lit when all traffic has been signaled to stop for a safe traversal of the crossing. This will make it much safer for pedestrians and easier for drivers. It may even make the traffic flow more smoothly in an already congested city.

Notes from last weeks chinese class

nǎ yi yè which page
chē zi car
wǒ xi huān guō rìběn che I like japanese cars
shōu speak
nǐ shōu shen ma you say what
zhè this
zhè shì this is
waì gúo yǔ yén Foreign country language
zhè shì goo lǎoshī this is goo teacher
zhè shì wǒ tài tai This is my wife
nimen dou shì mei guo ren Are you all american
dou bu shì zhōng guo ren we are not chinese
ying yǔ english language
zhōngwēn chinese language
hàn yǔ chinese language
dé yǔ german language
wǒ xi huàn hàn yǔ I like chinese language
zhe shi wǒ fù qīn this is my father
zhe shi wi mǔ qīn this is my mother
ne de mǔ yǔ shì shen ma what is you mother language
wo de mǔ yǔ shi ying yǔ my language is english
ne de mǔ yǔ your mother language
zhǐ only
wo you yi zhǐ gou i have 1 dog
wǒ you liǎng zhǐ gou I have 2 dogs
lǒu bǎn boss
wo shi lǒu bǎn I am boss
jǐng lǐ manager
chǎngzhǎng factory manager
gōng chǎng factory
gōng rén worker
zhì zuò rén programmer
dou all
ròu meat
niù ròu beef
zhū ròu pork
jī ròu chicken
yu ròu fish
yà ròu duck
dàn gōu chocolate cake
pinggou pài apple pie
dou all; both
nü hái girl
nán hái boy
hen rè very hot
shēn tǐ body
ne bāba māma shēn tǐ hao ma your mother father body well?
chī fàn to eat a meal
qù go
zhī dao to know
wǒ bù zhī dao i don’t know
tu shu guan library
cháng cháng often
wǒ chángcháng he kāfēi I often drink cofee
xǐ zǎo take bath
wǒ bu xi huan hè niú nǎi
nà shì shāshui who is that
nǐ ye shì laoshī ma are you also a teacher
bìng rén sick people
pàng fat
ta hen pàng he is very fat
dà big
xiao small
cháncheng great wall
zhèshì this is
nǐda shang rì shì your birthday is
wǒ de sheng ri shì jiǔ yùe