6
Jun 07

Google maps – embed a map in your page

When you get a new google map api, they give you some sample code to start with. If you want to put that code into it’s own page, with just the map, it’s easy enough. Just make a new page, paste the code in and save it. That’s what I did with my sample code. If you want to add that map to a page (like this page), you can use an iframe to do it. An iframe is just a html page embedded in another page, like a little window. So if I want to put this page:

http://nevan.net/maps/map.html

into this page

I can code it like this:

<iframe src="http://nevan.net/maps/map.html" style="width: 520px; height: 320px;"></iframe>

Here’s the result:

As a note, I gave the iframe 20 pixels more height and width to make up for margins and avoid scroll bars appearing.


6
Jun 07

Google Maps – very easy to add to my site

I just added google maps to my site, and it was much easier than I thought it would be. A while back, I tried to get google adsense, but found that you need content before they install it. Google maps is much easier, all they need is a website and directory where it’ll be used, and a google id. Here’s how to do it..

If you haven’t got a gmail account, go get one at http://gmail.com

Go to the google maps api page http://www.google.com/apis/maps/ and fill out the site and directory where you want to put maps. I put in http://nevan.net/maps/

You’ll get an api key which you can use in pages, and sample code, with a map centred on somewhere in America. Here’s what the code gives:

http://nevan.net/maps/map.html

In all, the whole thing only took 3 minutes. Next, it’s time to start learning how to change the maps.


8
Feb 07

Gmail – checking mail from other accounts in gmail

Finally, gmail allows you to check other mail accounts.


8
Feb 07

Dreamweaver – Changing Preview in Browser Keyboard Shortcut

I wanted to change the default shortcut key to preview in browser in Dreamweaver. Mac OSX has stolen the old key F12 for dashboard, and the alternative key, opt-F12 is too hard to remember. It took me a good 30 minutes to figure out how to do it, ending up with a web search which led to the Macromedia help site.

Here’s the trick: Go to the keyboard shortcuts in the “Dreamweaver” menu. Then select the pulldown menu for “Menu Commands”. Select “Document Editing” and find “Preview in Primary Browser”. Click on it to highlight, then you can see the shortcut currently in use. Click in the press key box and press the key you want to launch the browser. Click the change button. It asked me to save my settings into a new set, then I had to go back and select the key again.

Here’s the link to the Adobe help page


6
Nov 06

Nani wo shite yaganda

Looking through my Japanese notes today, I came across a little phrase from a movie. It’s long ago, but I remember that it’s from Nippon Ichi Goma Suri Otoko, 日本一ゴマすり男, one of the Nippon Ichiban series.

何をしてやがんだ!

it’s the same as

何をしてる!

or an exclamation, what the hell are you doing! My teacher explained the roots to me, it comes from this

何をしていやがるんだ!

chop off the ru ending and put in yagaru. This makes is more colloquial. This one’s got the 2nd ru from yagaru chopped off too, to make it even more colloquial.


6
Nov 06

Koots Green Tea Starbucks

Yesterday I met a friend and we went to Azabu Juban, in Tokyo. He’s working around there, and he showed me one of his favourite shops in the area, a chain green tea shop called Koots. It’s got a really similar setup to starbucks, or sutaba as they say here, and when I asked what sizes my macha shake came in, she held them up just like they do there. I’m not sure what they called the sizes, but I don’t think it was grande and tall. Could be wrong though.

I just checked the back of their shop card, and they spelt coming “comming”. Not very zen.


6
Jun 06

Hello world!

PHP Basics

Here’s the most basic thing you can do in PHP, print something on the browser screen. The command for doing this is print. So the command to print “hello” is

print “hello”;

with a semicolon at the end. Put this between some PHP markers <?php to start and ?> to end, and you have a php program.

<?php print “Hello”; ?>

You can do it other ways, like putting the word in brackets

<?php print(“Hello”); ?>
and it won’t change the output. you can leave out the semicolon since this is the only statement

<?php print “look, no semicolon” ?>

and you can squish the last php marker really close to the quotes

<?php print “it’s really close!”?>

but you can’t do this

<?phpprint “too close for comfort” ?>

bizarrely, you can do away with the quotes and just use brackets

<?php print(even_this_prints) ?>

and it will still work, but this won’t

<?php print(no spaces please) ?>