12/30/2013

Memo that was setting Syntax Highlighter on Blogger.

I set appearance of program code on Blogger by Syntax Highlighter.
but, There was a little problem. So, I will write memo of solution.

Syntax Highlighter is able to appear with row number that  program code on html.
of course, that's appearance is beautiful.
also, you can get more information from search by google.

Setting of Syntax Highlighter is follows.

1. Page for the generation of Syntax Highlighter(below link), I generate code for CSS and JavaScript needed to configure the Syntax Highlighter.
    http://www.way2blogging.org/widget-generators/syntax-highlighter-scripts-generator


2. I set the head tag of the html code of CSS and JavaScript needed to configure the Syntax Highlighter generated.

3. The class attribute of the tag of where I want to display beautifully with line numbers of the program code  Completion to set the class name that is ready for Syntax Highlighter.


From here, and I was actually set, it is what was addicted.

* First, check the programming language to be displayed with line numbers in the program code page for the generation of Syntax Highlighter(below link).
    http://www.way2blogging.org/widget-generators/syntax-highlighter-scripts-generator




* Then, click the Generate button.




* Code of CSS and JavaScript required to set up the Syntax Highlighter is generated. Therefore
Code is incorporated into the clipboard by clicking the Copy To ClipBoard button.
(In select all the code, is acceptable. Also a copy)


* Click on the Settings screen of the Blogger "Template", and click the "Edit HTML".


* </ Head> just before the tag, I paste the code of CSS and JavaScript needed to configure the Syntax Highlighter that you just copied.


* I tried to click on the "Preview template" set of Syntax Highlighter is being reflected in the then, but the setting of the Syntax Highlighter is not reflected.
(Pacakage ~ is the relevant section, but. Line number has not been displayed, has become the only text)


* Although was confirmed I think that there are no errors in the text that you have posted to Blogger
Class name that is ready for Syntax Highlighter is set.
(<pre class = "brush: java"> is relevant location)



* When I am looking where to find there is no configuration error, looking at the page of the actual Blogger
Setting Syntax Highlighter had been reflected.



So, the setting of the Syntax Highlighter is
In the preview, it will not be reflected in the template,
It is do I have to check the page of the actual Blogger. (Dec. 30, 2013 point)

6/11/2013

Get new line code that readLine of BufferedReader in Java.

readLine of BufferedReader in Java is return contain string by new line code.
but it is not contain new line code.

I working simply that is make data replace tools of text file.
that text file has been edited by Mac or Windows.
Therefore, it is include some new line code.

So, when after replace data if new line code is no previous new line code then confuse where modified by replace data.

Next, I search this problem on the internet.
However, not found that return  new line code that readLine of BufferedReader.

So much trouble, I expand to contain new line code from return that readLine of BufferedReader.

Program is simple.
when reading data, if exist \r or \n in data then return value with new line code.

This code is below.

package extension.java.io;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.Reader;

public class ExtensionBufferedReader extends BufferedReader {

    public ExtensionBufferedReader(Reader in) {
        super(in);
    }

    public ExtensionBufferedReader(Reader in, int sz) {
        super(in, sz);
    }

    @Override
    public String readLine() throws IOException {
        int num = 0;
        StringBuffer strBfr = new StringBuffer();
        try {
            while ((num = this.read()) >= 0) {
                strBfr.append((char) num);
                switch ((char) num) {
                case '\r':
                case '\n':
                    return strBfr.toString();
                default:
                    break;
                }
            }
        } catch (IOException e) {
            throw e;
        }

        if (strBfr.length() == 0) {
            return null;
        } else {
            return strBfr.toString();
        }
    }
}

1/05/2013

New Year's visit to a Shinto shrine

I went to the shrine to ShoinJinsha of Hagi at January 1.

When I went to the shrine to ShoinJinsha in the past, the car is small
Although I was able to park your car in the parking lot of the nearest ShoinJinsha,
Car even more, than ShoinJinsha, we parked the car in the parking lot away a little.
At the same, but I did not that the New Year's visit to a shrine of ShoinJinsha, waited in line previously,
This time, is around about 30 minutes roughly, but I waited in line for the first time.






1/04/2013

Finally return home

I went from Seoul Airport Korea to Fukuoka Airport in Japan.
departure is  12/31 18:40,  arrival is 12/31 19:55.

Affairs and belongings and check luggage, immigration to people who have been assessed by
It was asked what was in Canada.
Yourself because 33-year-old age, thus, it was like was considered to be a job for people who have been assessed.
However, I was going to learn English. And reportedly, it came to an end immediately.

Then, move to Hakata Station subway from Fukuoka Airport.
From there, I moved to Asa Station is the nearest station of the home in the Shinkansen.

Time I come home, it was about 11 pm.
Family because it is New Year's Eve, I was looking at the Kohaku Uta Gassen.
I was very tired, but you can eat meal, bedtime was about 3 pm of 1/1 entering or bath.
It did not sleep for about 30 hours. Cheers for good work.


1/03/2013

I arrived Seoul Incheon Airport.

Evening of 12/31, South Korea arrived in Seoul Incheon Airport.
The Airport, there was a little snow.

Came to South Korea This is the first time I have tried.
It is a stay of only Incheon Seoul Airport, but it was very clean.
Perhaps because it is close to Japan, and is similar to Japan.

Once I have arrived in Incheon Seoul Airport, it checks the passport and luggage
After that, I moved in vehicles such as the subway to the place where I want to board a plane flying to Fukuoka.

A little, before boarding, because there was a time, I tried to drink draft beer.
It was paid by Visa card, but can also be used Japanese Yen.

Although I thought it was so much trouble, and either try to eat something,
I quit after a few hours after, it will return to the home.

1/02/2013

To South Korea from Detroit

America went to South Korea aboard the airplane 12/31 16:25 wearing Incheon Seoul Airport Korea of 12/30 12:20 shot Detroit Airport.

When heading to Canada via the United States from Japan, I did not drink liquor
I drank beer and wine this time.
By the way, wine and beer was free.
Long flight but was very painful to go
So, you are not a pain this time.
And had watching a movie, it might be because were able to relax a little alcohol enters.
After that, it is still in the flight of about 15 hours, and did not become sleepy at all that strange.









1/01/2013

American McDonald's in Detroit

The United States before returning to Japan I went to McDonald's in Detroit Airport.
As I do not have US $, I asked whether the use Visa card to go to the cash register,
Since such that it with the use, I bought a Coke and a cheeseburger.




By the way, Japan also Canada also did not know the difference in taste.
Speaking of a different place, it is that the menu is different in Japan, Canada and the United States.
(I do not remember what was the menu, and I have forgotten to take a photograph.)




After, Canada and Japan, cola Although it was Coca Cola,
America was a Pepsi. Canada and the United States I was a self-service drinks.



At the same, storage boxes of paper napkin is the same in Canada and Japan
The United States was a little different.

12/30/2012

I returned to Japan from Detroit.

I go to Detroit Metropolitan Airport from now, I will return to Japan via Korea.
Once in flight at the root of the next, until Yamaguchi home from Fukuoka is the Shinkansen.
It is likely to be returned home by the end of the year.

1. Detroit Metropolitan airport 12/30 12:20 -> Incheon Seoul Airport arrival 12/31 16:25
2. Seoul Incheon airport 12/31 18:40 -> Fukuoka Airport wearing 12/31 19:55

If you look at the courtyard of the hotel, the snow has piled up.
Detroit is also cold.

I am in Detroit USA.

Because this morning, to return to Japan from Toronto, Canada
It was supposed to move in the next appointment.

1. Toronto Pearson airport 12/29 11:08 > Detroit Metropolitan Airport arrival - 12/29 9:45
2. Detroit Metropolitan airport 12/29 12:40  -> Narita Airport wearing 12/30 16:15
3. Narita Airport departure 12/30 - 19:45> Fukuoka Airport wearing 12/30 21:55

But, wheelsup of Toronto Pearson airport of 1. Is delayed to late
It was arrived at Detroit Metropolitan Airport it was around 12:30.
Of course, if there is no transit time, and I did not get on an airplane to Narita bound.






So, I asked what to do if anything goes wrong, the people of the airline.
Happens, the person who asked because it was Japanese, we can talk in Japanese.

Then, staying in hotels in Detroit Metropolitan Airport near today,
The next day, Detroit Metropolitan Airport - and the root of the> Fukuoka Airport - Incheon Airport> South Korea
So was able to take a ticket, please move in its route. It was with.

Meals and hotel hotel bill (lunch or dinner) is the airline burden.
It was me Pass me to print a paper certificate to that effect.
And, the hotel shuttle bus since coming to Detroit Metropolitan Airport
Please go to the hotel to ride in it. So was that of the
The taught where the shuttle bus will come, it has been moved to the hotel.






Stomach vacant after arriving at the hotel, and settle down a little.
Come to think of it, because he had not eaten only snack I got on board today.
Taught me that you can eat in the hotel restaurant from 00: If you asked that of the meal at the reception of the hotel, 17.

And, 17: I went to the hotel restaurant to 00, the paper certificate (lunch or dinner) for meal
When you show the clerk of the restaurant, lunch or dinner, 6US dollars each. That was tell me that it can use to 12US dollars.



While I think 12US dollars a little less, in the restaurant, we ordered a hamburger and a bottle of Budweiser. Is about 17US dollars.

6US dollar for one sheet of paper certificates (lunch or dinner) for meal is discounted
I was paid with Visa card about 9US remaining $.

Still, Kobara because it was a little crowded, buy bread and drinks at the shop of the hotel.
This shop I did not use the Visa card, but of paper certificates (lunch or dinner) for meal
We were able to use 6US dollars. I was 6US dollars just used.



After returning to the room, I noticed, but it does not have a toothbrush and toothpaste.
As soon as I find out about hotels in the United States on the Internet.
Then, Amenities goods for free at the reception, I will receive you.
Also, when someone brought them to the room, it is likely have to pay the tip.
So, I got a toothbrush and toothpaste to go to reception.

It has encountered trouble today, but I feel that it was good experience has been.


12/28/2012

The Beer Store

In Toronto, I was ever bought alcohol at LCBO.
I know at a store that sells liquor to the other, it is The Beer Store.
And I went out of interest.

Then, literally in the shop, I did not sell only beer.
It was also a shop such as beer for bulk buying.

To there was parking in front of the store,
Customer is lined, I will buying the beer indeed. It was that atmosphere.

Myself because it was the aim of the liquor or other beer, separately
I left the store immediately.


12/27/2012

Sunrise and sunset of Canada

I have come to Canada, it is July 16.
Season at that time is the summer as well as Japan.

If you spend a few days to come to Canada
I noticed day to have come from around 4:00 am
Well, a little, sunrise is it fast compared with Japan this. I feel that.
But, sunset was 10 pm, it was a surprise.
It is about 8 pm even as long as Japan's.

And, Although it is sunrise and sunset of recent
in about 7:30 am to 5 pm

(During the winter months, Canada has been delayed for about an hour. This is the time of the Canadian time described above.)

Sunrise is early summer, sunset is slow Canada.
And, sunrise is slow, sunset is early winter.

Latitude because the above Japan, I can feel that there is a difference in sunrise and sunset about that amount.
This photo is taken from the room living at 7:30 am.



12/26/2012

Tim Hortons

There is a chain store of coffee shop of low price in Canada.
That is the Tim Hortons.
There are also chain stores such as coffee shop Second cup and Starbucks
In price, Tim Hortons is It is the cheapest.

At Tim Hortons, small coffee but is about 1.25 Canadian Dollar
In Second cup and Starbucks, I will about two Canadian Dollar.

Just to think personally, towards the Second cup and Starbucks is delicious coffee
Inside the store will feel clean.
I think I think that there is also a interior of the store, but the price is high, customer base is because have changed.
Tim Hortons is sometimes apparent from the store are people ish vagrants.

After, not just coffee, the menu also has been enhanced to Tim Hortons.
There is also a menu of snacks for lunch and morning.
Donut that Tim bit I a 20 cent one, but it is delicious.

In Toronto, everywhere, I saw the Tim Hortons.
With the low price, was a little, it is perfect for Tea break.



12/25/2012

Alcohol situation in Canada 2

How do are selling the drink food and drink retailers, such as supermarkets, convenience stores in Japan
It does not sell the shop and those in Canada.

So, are you not buy you a drink? I do not know I might think
Is there a shop that deals with liquor.

So, I do not buy you a drink that it is not a shop that deals with liquor.
What I bought a drink well It is a shop of the chain store called "LCBO".
You can buy a variety of drink beer, wine, and whiskey.
There is also a sake, and there is also a drink called Soju in Korea.
However, it is never seen shochu.
There is also a chain of stores called "The Beer Store" in the other.
Is you have never been to the store of their own here.
I think now, and let's go.

12/24/2012

Alcohol situation in Canada

In like Japan and Canada, anywhere is not drink liquor.

Huh? Will not do that. Although I think
To be precise, at home or in the pub, and I hope to drinking
Public places, the road, in the train or bus, you should not be drinking.
This has been prohibited by law.

And I heard a teacher of language school, but if, in a public place, if you drink
It seems do not have to pay a fine. It seems about 180 Canadian dollars. .

By the way, although I went with my friends to a place called Woodbine Beach in summer
There were local people drinking on the beach beer.
When you talk to the teacher of the language school the story
It was "occasionally.'m The kind of person" and.
After, since I think "If, If you are caught by the police who came from abroad as you, and are you drinking in public places, and be deported to their own country, you be care. it was with ".

When you drink alcohol in Canada, let's be careful.

12/17/2012

DOLLARAMA

There are 100 yen shops in Canada.
It is DOLLARAMA. It is referred to in the Daiso Japan.

(There is also a pan.) Stationery, sweets, food, cosmetics, and accessories, You can buy at a low price.
In not one Canadian dollar as well as all Daiso, there is also a commodity CAD 2, 3 Canadian dollar.

However, in DOLLARAMA they may have made, it was a shame personally, when you have a shopping
It is that you did not use the Visa card. I've used the cash.

I think when you live in Canada, when the household goods you want, it is good to shopping to go to DOLLARAMA first.

12/01/2012

Red lobster

We have to eat lobster.

It is a shop called Red lobster of the Eaton Centre nearby.
It is with a roommate that went with the Brazilian restaurant previously.

First, when I drink beer drinks
Salad appetizer since has been carried, I will eat them.




Thereafter, the plate of lobster in the main because has been carried
I was eating them, and also ordered a bottle of Riesling.

Plate of lobster is about 25 Canadian dollar bottle about 30 Canadian dollars, of Riesling.
At the same, beer and drank at the beginning, 2 cups was around about $ 30 a glass of wine later.
At, accounting was approximately 70 Canadian dollars per person.

Hey, the price is increased, but the lobster was delicious.
However, the source because a little oily, tastes may seem divided.

Well, if you do not to drink too much, one drink is as about 10 Canadian dollars,
Plate of lobster is about 30 Canadian dollars. At the same Since about about 45 Canadian dollars, including chip
I think than guests, give you quite.






11/24/2012

Brazilian Restaurant

It has gone to Brazilian restaurant.

Now, a student dormitory of the language school, room living room arrangement is of 2LDK.
Two roommates and their lives there.

Brazilian roommate of 55 years old.
Than me, English is far above.
So, I will be practicing English.

At, it is the main issue, but the Brazilian roommate because I say ".'m Let's go to the Brazilian" to today
I went together.

Brazilian cuisine is feeling Meat Meat Meat Meat Meat Meat Meat Meat Meat Meat Meat Meat ....

The Brazilian restaurant, the staff will bring me a variety of cuisine.
(Cattle, pigs, chickens, sheep) most is the meat, but it has been stuck to what they are, such like knife long.
And, food is brought to you whether you want. I will listen to.
Want. If you say, you can cut off a portion of the food had been impaled on something like a long knife
You put me in a dish of their own.

At meal time of the restaurant for two hours. In the meantime, the staff's bring me food.

However, it is troubled is full stomach, staff and bring me food.
So, there is a rule that staff ask them to not brought food.
The table, the rule has been placed card.
The table of the card, I will still eat. The back of the card, I do not eat anymore. I represent the meaning of.
In this, the staff brought the food, you do not need brought. Cues that are always possible.

It was thought this time, it was delicious cuisine in Brazil is the fried bananas and grilled pineapple eating for the first time.
It is a delicious cinnamon is sprinkled both.
When you eat pineapple grilled meat of a large amount, a little, you can eat meat and also to clean for some reason.
So, I ate a lot of grilled pineapple.
Well, the minute, although we eat meat.

And I was a good thought, but is surprised at the time of accounting.
We were about 100 Canadian dollars per person.

Later, I heard in person, but the price is seems high Brazilian restaurant.
However, since you can eat delicious meat of a large amount, to those who glutton, and I recommend.

- Grilled pineapple -



- (Two on the left) fried bananas -


9/16/2012

Toronto Zoo

It has gone to Toronto Zoo.
Toronto Zoo has been away from the city.
Descended from Don Mill subway station a (Purple line), is located about 40 minutes by bus.

Because of the high price drinks, food animal park
Of course, I have to bring their own lunch and water.

To about noon, we takes about 5 hours to look around all the zoo.
It is very wide.

I think I went to the zoo,'s elementary school since, but once in a while
There is also a wonder how to spend such time. I think.