銀座で安いランチ よもだそば ワンコイン

Yomodasoba is reasonable restaurant in Ginza.

400円でメンチカツそばを提供していました。

今までいろいろ食べてきました。

  • メンチカツそば 400 yen
  • ハムカツそば 400 yen
  • メンチカツせいろ 400 yen
  • わかめそば
  • Yomoda Soba
  • よもだ半カレー

Most of dishes are less than 500 yen (about 5 dollars). Dish of curry and soba is less than 700 yen.

温かいそばの上にハムカツを載せた400円のハムカツそば

松屋のような、券売機でチケットを買うタイプです。 お店の中は決して広くはなく すべてカウンターになっています。

いつもそうなんですが、女性客何人かきています。 意外ですけど。

Map of Yomodasoba

The near stations are Yurakucho, Hibiya, Ginza and Ginza Itchome.

Father’s Day Present in 2014

Father’s Day was coming. What would you present? My father was 55 years old.

He reduced the time of drinking. 食べる量も減った、お金はあるからそれなりのものを食べている、ケーキが特別好きなわけでもない、これといってものすごく好きなものがあるわけでもない、……。 なにを贈ればいいのかとっても悩みましたが、 I decided to present fresh fish.

What I did

Search fresh fish in Rakuten, with the keywords, “ ” that mean fresh and fish.

I chose pike conger, which is very famous for dishes in Kyoto.

旬の魚、です。 私の実家ではを食べる機会が少ないので、新鮮でおいしい鱧を贈ることにしました。

価格も 4,000円 程度 なので、 母の日ギフトと同じくらいです。 楽天の評価も高かったので、きっとおいしいんだと思います。 自分の分も買えばよかった……。

Calculate Pentagons and Hexagons in a Soccer Ball

There are many pentagons and hexagons in a soccer ball. Now, let’s calculate them.

Euler’s formula

On polyhedron, the following equation is valid.

(vertex count) – (edge count) + (face count) = 2

The proof of Euler’s formula is written on Think about Euler’s Formula on Polyhedron.

Now, using this formula, calculate the number of pentagons and hexagons. ( I calculated faces, etc. without Euler’s Equation on Soccer Ball and Regular Polyhedron . )

Calculate

Define \( m \) as the number of pentagons, and \( n \) as one of hexagons.

On soccer ball, one vertex is common in 3 planes. So, the number of vertexes on a soccer ball is expressed as \(\frac{5m + 6n}{3}\), the number of edges is \(\frac{5m + 6n}{2}\), the number of faces is \(m + n\) .

According to Euler’s formula, the following equation is valid.

$$ \frac{5m + 6n}{3} – \frac{5m + 6n}{2} + m + n = 2 $$

Now, calculate the above equation and get the value of \( m \) .

$$ m = 12 . $$

On a soccer ball, one pentagon neighbors 5 hexagons, and one hexagons neighbors 3 pentagons. Then, ( n ) is calculated as the following.

$$ n = \frac{5 m}{3} = \frac{5 \times 12}{3} = 20 . $$

From the above, the number of hexagons is 10, and the number of pentagons is 20.

You can calculate them with Descartes theorem. I wrote it on Proof of Descartes Theorem.

Note

The shape of Fullerene, C60, is the same as soccer ball. Let’s check whether the number of vertexes is 60.

$$ \frac{5m + 6n}{3} = \frac{5 \times 12 + 6 \times 20}{3} = 60 . $$

Reference

Euler’s formula is explained in the following book.

VBA: Output file list in a directory, recursively

This is the code I frequently use.

It recursively exports file list in a directory on Microsoft Office Application, like Excel. It is written in VBA.

VBA can be written in object oriented way, but I didn’t because I had to write the code as soon as possible.

Process Flow

  1. A user clicks the button on the sheet.
  2. The program show a folder browsing dialog.
  3. User chooses the folder, then the program make the list of file in the folder.
  4. The program exports the file list onto a form (or sheet).

To Do

  • Create a module file and create the following functions.
    • get file list
    • handle folder browsing dialog
  • Create a dialog to show the result.
  • Create a button on the sheet and add function on clicking.
Continue reading VBA: Output file list in a directory, recursively

How to Edit Remote Files on Local Computer

I will introduce the way to edit and save files at the remote server, on my local machine, and other alternative way.

Story

At the company, everyone develops the program on the remote server. Yes, it is Linux server with dark terminal, which provides only vim editor. The server can’t connect to public internet, so we need to upload tools with WinSCP from local machine if we want.

ローカルマシンで開発環境を構築するにも、いろんなチームが開発した多様なライブラリがないと動かないようになっていたため、ローカルマシンの環境を構築するのは困難な状況でした。 ファイアウォールの接続制限なんかもあって。

So I decided to edit remote files directly on the local machine, which can connect to the internet and install rich editors.

ここからは、リモートのファイルを(擬似的に)直接編集できるエディタを紹介していきます。

インストールすれば編集可能になるエディタ

まずは、インストールさえすれば編集可能になるエディタを紹介します。 プラグインなどの追加インストールは不要です。

NetBeans

IDE なら簡単にできるんじゃないかと思って トライしてみたのが NetBeans です。実際のところ、とても簡単に思い通りのことができました。

保存時に自動でリモートマシンに保存してくれます。シンタックスチェックもやってくれます。

既存のリモートマシンのファイルを元にプロジェクトを作成して進めていくこともできますし、新たにプロジェクトを作ってそこからリモートマシンにアップロードすることもできます。

やりかたは、 NetBeans のページで紹介されていますので、そちらをご覧ください。

参考: NetBeans IDEを使用するリモートWebサーバーへのPHPアプリケーションのデプロイ

Komodo Edit

Follow Edit, Preference, and you can configure remote server. After configuration, it can edit remote files.

reference: Basic settings to use Komodo Edit (removed: http://shimz.me/blog/editor/148)

gedit

After some configuration, it can edit remote files.

reference: Use Gedit as Remote File Editor via FTP and SSH (Ubuntu) (removed: http://thecodecentral.com/2010/04/02/use-gedit-as-remote-file-editor-via-ftp-and-ssh-ubuntu)

プラグインなどをインストールすることで編集可能になるエディタ

ここから下は 別途プラグインなどのインストールをすることで、リモートファイルが編集可能になるエディタです。

Eclipse

プラグインを使うと NetBeans と同じようなことができます。 プラグインは General Purpose Tool – Dynamic Languages Toolkit -Remote Development Support 。

参考: Eclipse Keplerで仮想環境上(リモート上)のファイルを編集する。

Sublime Text 2

It can edit remote files with SFTP plugin.

reference: Sublime text SFTPをつかってリモートファイルをローカルで快適に編集

It can edit remote files with rsub plugin, which requires the server to install something.

reference: リモートサーバー上のファイルをローカルのSublime Text 2で編集する (deleted)

Notepad++

It can edit remote file with NppFTP plugin.

reference: How to setup Notepad++ FTP plugin “NppFTP”

geany

geany はサポートしていません! ……が、 gnome だったら fuse を使えば ローカルマシンのようにリモートファイルを扱えるそうです。 これだと、 geany でなくても gnome なら どんな エディタ 使っても OK ですね。

reference: Does Geany support editing files remotely through FTP or SSH?

gVim

Windows マシン から、 PuTTY と連携して scp を使えるようにしようとしましたが、あえなく失敗。リモートマシンからファイルの一覧すら取得できませんでした。やり方を紹介しているサイトは多いのですが。

興味のある方は是非。

reference: vimからSSH/SCP接続してみる