From Maitreya Festival 2007 |
such an awesome festival, Maitreya had brilliant music and a great mix of people... reminded me of parties going back a few years
From Maitreya Festival 2007 |
I have a sony Sony Ericsson Walkman® w800i and my laptop has bluetooth
what's really cool is you can use HID profiles and use your phone as a remote control, for bluetooth winamp for example.
there are a couple of tricks to know
firstly, you can find the remote controls under the entertainment menu on your mobile phone
secondly, in order to get it working on a toshiba laptop, you need to make a new connection to your phone, but not via the express method, use custom and select the HID driver
Toshiba Assist -> BlueTooth Settings -> New Connection
Make sure you select the HID (Human Interface Driver)
this secret to getting the bluetooth remote control working with a toshiba laptop and a w800i... otherwise you get a Bluetooth connection failed error, even when you can transfer files to your phone
Firstly download the IP-To-Country Database and unzip it
Then create a table in oracle
CREATE TABLE IPTOCOUNTRY(
IP_FROM NUMBER,
IP_TO NUMBER,
COUNTRY_CODE2 CHAR(2 BYTE),
COUNTRY_CODE3 CHAR(3 BYTE),
COUNTRY_NAME VARCHAR2(50 BYTE),
REGISTRY VARCHAR2(30 BYTE)
) TABLESPACE USERS;
ALTER TABLE IPTOCOUNTRY ADD (
CONSTRAINT PK_IPTOCOUNTRY PRIMARY KEY (IP_FROM, IP_TO)
USING INDEX
TABLESPACE USERS);
Load the data using the following sqlldr control file
(hint edit the paths)
OPTIONS (SKIP=132, DIRECT=TRUE)
LOAD DATA
INFILE 'C:\downloads\geoip\IpToCountry.csv'
BADFILE 'C:\downloads\geoip\IpToCountry.bad'
DISCARDFILE 'C:\downloads\geoip\IpToCountry.dsc'
INTO TABLE "IPTOCOUNTRY"
WHEN (1) <> '#'
FIELDS TERMINATED BY ',' ENCLOSED BY '"' AND '"'
( IP_FROM,
IP_TO,
REGISTRY,
assigned filler,
COUNTRY_CODE2,
COUNTRY_CODE3,
COUNTRY_NAME)
then once that's loaded, you can then query the database, but you need to convert the ip address ( IE CGI.REMOTE_ADDR ) to a long ip format (ip2long in php, inet_aton in mysql), here's a CFMX library IPConvert for CFMX that will convert dotted quads to long numeric ip addresses and back.
then you just need to do a simple database query
SELECT *
FROM iptocountry
WHERE ip_from <= <cfqueryparam value="#ip_long#" cfsqltype="CF_SQL_NUMERIC">
and ip_to >= <cfqueryparam value="#ip_long#" cfsqltype="CF_SQL_NUMERIC">
I'm working a new project and i'm using postgres for the first time in a while...
I was experiencing very strange behavior, queries are only working if i double quote the column and table names.
I know this from autogenerating the query in pgAdmin III. I'm using CFMX and JDBC, but as always with a database, go back to the native db tools first to test a
problem
SELECT "USER_ID", "EMAIL_ADDRESS", "FIRST_NAME",
FROM "USERS";
works fine!
SELECT USER_ID, USER_TYPE_ID, EMAIL_ADDRESS, FIRST_NAME, MIDDLE_NAME,
LAST_NAME, USER_PASSWORD, DATE_CREATED, DATE_UPDATED,
DATE_LAST_LOGIN, DATE_PASSWORD, IS_ACTIVE
FROM USERS;
but this one fails with "ERROR: relation "users" does not exist"
I had been stumped for a while and i then I found the answer: http://www.thescripts.com/forum/thread3102.html
The create table script had double quotes around all the column and table names and will only work as such as a result, "USERS" and USERS are two different things..
very intuitive... it's friday
Time for a new lens :)
I finally got a Canon 10-22mm EFS lens just in time for this years Rainbow Serpent Festival.
It's a great match to my existing 17-85mm EFS lens, but to be honest i barely switched lens the entire 5 days, wide angle rocks
From Rainbow Serpent 2007... |