2014-09-01から1ヶ月間の記事一覧

情報を伝える

Please be advised that our company address has changed. We would like to advise you that your order has been shipped.

催促の表現

Please inform me of the situation by return e-mail. Please inform me of the details by return e-mail. Please let me know the shipping date. Please notify us if there are any problems.

断りの表現

Unfortunately, I will.. and will be unable to .... (残念ながら...なので、...できない) I regret that I will have to cancel the appointment.

お祝いの表現

Congratulations on your promotion. Congratulations on a job well done. Please accept my best wishes on your second anniversary. Please accept my sincere appreciation for your cooperation. (ご協力に心から感謝いたします)

メールに添付するときの表現(2)

Below is the agenda for the next meeting.(以下は次の会議の議題です) I'm writing to remind you that we have a meeting next week. (リマインドです) I'd like to inform you of the details...(詳細に関してお知らせします) I'm attaching the minu…

メールに添付するときの表現

Here is the agenda for monthly meeting. (月次会議の議題をお送りします) Here is the estimate. (見積りをお送りします) Here is the list of our new products. (新製品のリストをお送りします) Please note that (〜をご確認ください) Please note t…

ファイルへの書出し

数字をファイルに書き出す場合の例 > (define port (open-output-file "test.output")) port> (display port) #[port 0x1174bee0] > (define num 10) num > (write num port) ()> (close-output-port port) #f > 唯一の解説ページ:Scheme 入門 9. 入出力

繰り返し処理の実装

>(for-each (lambda (x) (newline) (display x)) (list 1 2 3 4 5) )1 2 3 4 5 > 上の例のように5つくらいならリストを作れるが、数が増えるとたいへんになる。任意の数に拡張したい。他の書き方はないか?例えば下のように書く。 > (define (func n) (if (>…

リスト

(list-ref リスト 番号n):リストのn番目のものを返す (length リスト):リストの長さを返す 実行例 > (define odds (list 1 3 5 7)) odds> (display odds) (1 3 5 7) > (list-ref odds 0) 1> (length odds) 4

begin式

2つ以上の式をまとめて1つの式にするにはbegin式が使える。 if文の中で使えば、複数の処理ができるようになる。

mapとfor-eachの挙動の違い

mapは引数として手続きとリストをとり、その手続きをリストの各要素に作用させてできた結果のリストを返す。 mapの実行例。 > (map (lambda (x) (* x x)) (list 1 2 3 4) ) (1 4 9 16) > for-eachもmapと同じで、引数として手続きとリストをとる。しかし、結…

一方的にメッセージを表示するダイアログ

ある程度時間のかかる処理を行っている間、メッセージダイアログを表示したい。「今、印刷中です」のようなもの。 MessageBoxを使うと、メッセージ画面にボタンが一緒に表示されてしまう。「OK」「キャンセル」「Yes」「No」等。表示するダイアログは処理の…

クォート

リストや記号を評価される式としてではなく、データオブジェクトとして扱いたときには引用符(')をクォートするオブジェクトの前に置く。使用例 > (define a 1) a > (define b 2) b > (list a b) (1 2) > (list 'a 'b) (a b) > (list 'a b) (a 2) >

ファイルの保存ダイアログ

IronPythonによるGUIで、ファイルを保存するダイアログを開く処理を実装する。 SharpDevelopを使ってコードを書くことを想定する。まず、ボタンを一つ設置する。このボタンを押したときにファイル保存ダイアログが開いてユーザーにフォルダとファイル名の入…

ざっと目を通す(look over)

Please look over the attached document.

ご都合をお知らせください

Please let me know a convenient date for you to do so. Please let me know if it is convenient for you. Please give me a call at your convenience.

TOEIC結果

Readingの結果がひどいので、次回までに対策を。最後まで解かないうちにタイムアップになったし。この結果を見ると、将来的に900点台までもっていくのは至難のわざ。テスト用の勉強をすることで、何点上がるかを次回は確認する。 次回までに行うこと テレビ…

返事が遅れて申し訳ございません

Please forgive me for writing so late to reply to your message.

メールの返事が欲しいときの英語表現

I look forward to receiving your reply soon. I hope to hear from you as soon as possible. May I have your reply by September 10, if possible? Please let me have your reply as soon as possible. Please may I have your reply as soon as possib…

ファイルを開くダイアログで使えるメソッド

ofd = OpenFileDialog() ofd.Filter = "text file (*.txt)|*.txt" #ダイアログに表示するタイトル ofd.Title = "Select text file" #初期指定フォルダ ofd.InitialDirectory = "C:\\" #初期指定ファイル ofd.FileName = "test.txt" ofd.RestoreDirectory = T…

コードの中で別プログラムを実行

import os os.system("C:/Program Files/myprogram.exe") これで起動しようとすると、 'C:/Program'は、内部コマンドまたは外部コマンド、操作可能なプログラムまたはバッチファイルとして認識されていません。 となるので、代わりに import subprocess subp…

doループの書き方

(do ((i 1 (+ i 1))) ((= i 7)) ...(繰り返したい処理) ) 無駄な括弧がある?

Thank you以外のお礼の表現

-I am very grateful. -Your assistance meant a great deal to me. -It was a pleasure working with you. -Thank you very much for the valuable advice. -Thank you again for taking the time to see me. -I really appreciated your support during th…

英文メールの言い回し

間違った宛先のメールを受け取ったとき I received the following e-mail from you last night, and believe that you made an error in the address. I am afraid your e-mail mistakenly got sent to the wrong address. My name is not ... ミーティング…

schemeに慣れる

局所変数x、yを定義する。そのためのlet。 定義した局所変数の値を変更する。そのためのset!。使用例は以下の通り。 (define (example) (let ((x 0) (y 0)) ... (set! x (+ x amount)) (set! y (+ y amount)) ...

ListViewの編集

ListViewにアイテムを追加したり、選択したアイテム行を削除する方法。 簡単なサンプルコードを下に示す。ここでは、Addボタンを押すと決まった文字列を追加する。アイテム行を選択してRemoveボタンを押すと行を削除する。行が選択されていなければ何もしな…

開かれるウィンドウの初期位置を定義する

何も指定しないとデフォルトロケーションということで、左上寄りに表示される。 画面中央に表示する場合の設定 class MainForm(Form): def __init__(self): self.InitializeComponent() def InitializeComponent(self): self.SuspendLayout() # # MainForm #…

GUIから外部ソフトを実行したい

以前に、GUIからPDFファイルを開きたい - 理想のユーザ・インターフェイスを求めてを検討したが、コマンドラインから実行できる任意のプログラムを、同じようにGUIボタンを押したときに実行できるようにする。 やりかたはPDFファイルを開いたときとほぼ同じ…

WebBrowserフォームのサンプル

画面上にWebBrowserのFormを配置する。そのサンプルを下に示す。 url_fileに、URLを指定する。サンプルのようにローカルに置いたHTMLファイルのファイルパスを指定しても問題なく表示される。 import System.Drawing import System.Windows.Forms from Syste…

exeファイルもしくはdllファイル作成

IronPythonのコードを、Command Line Python Compiler (pyc.py)でコンパイルして実行形式ファイルを作成する。 実行例。 > ipy.exe pyc.py /main:main.py /target:winexe Input Files: Output: main Target: WindowApplication Platform: ILOnly Machine: I3…