2022/07,江端さんの忘備録

BS世界のドキュメンタリー 「インポッシブル・プロジェクト インスタントフィルムを復活させた男」

"BS World Documentary "The Impossible Project: The Man Who Revived Instant Film"

を見ました。

I watched the program.

「楽しかった」―― というか「嬉しかった」。

I enjoyed it, rather I feel happy.

-----

私は、自分の半生を、デジタル技術の先端分野で過してきた、という自覚があります。

I am self-conscious that I have spent half my life on the cutting edge of digital tech.

(ちょっと言い過ぎかもしれませんが、世間一般的には、間違っていないと思う)

(It is a bit of exaggeration, but in general, I don't think it's wrong)

だからこそ、「全てにおいて、デジタルがアナログより良い」と言い切れないことも、良く知っています

Therefore, I know that we should not say that "digital is superiors to analog at any case"

それはさておき。

That's aside.

-----

最近、さまざまな企業で、「創造性を高める為」の『共創空間』なるものが流行っているようです。

Recently many companies are trying t make "co-creation space" to "enhance creativity".

このような空間で、「創造性が高まった」という、客観的な(数値等を使った)報告書は見つけられていませんが、このような『おしゃれ』な空間で仕事をする人が好きな人は、多いのかもしれません。

I could not find the reports that show the effectiveness of "creativity" from objective viewpoint using numbers, however, some people seem to like to work in these fashionable space.

一方、私といえば ―― 「ビビッドな色彩の壁」「奇妙な形の(不安定な)椅子」「多くの仲間」「コーヒーの香り」の中で、特許ネタを捻り出せたことがありません ―― というか、

On the other hand, speaking of me, I have never been able to think of a patent story among the "vividly colored walls," "oddly shaped (unstable) chairs," "many friends," and "the smell of coffee.

むしろ「創作の邪魔」と言い切れるレベルです。

Rather, they are always "obstacles" for my patent work.

私の場合、「暗い」「寒い」「狭い」部屋で、たった一人でホワイトボードと対峙している時に、創造力は最高潮に達します。

In my case, my creativities go to the peak when I am alone in the "dark", "cold", "small" room, facing a whiteboard.

企業研究員で、特許出願100件(分割出願やパリ条約の優先権出願を含む)越えをしている人間(例えば、私(江端))が、それほど多いとは思えません。

I don't think that there are many people who have applied more than 100 patent applications( including "divided" or "priority by Paris treaty") to the patent office, like me.

それ故に、『共創空間』の効果は、個人差が大きいのかもしれませんし、または、私が例外的に「変な奴」なのかもしれません。

Therefore, the effectiveness of the "Co-Creation Space" may vary greatly from person to person, or I may be an exceptionally "weird guy".

まあ、「暗く寒く狭いセピア色の実験室」を、『共創空間』と言い張ったら、企業イメージは悪くなるとも思いますので、そこは、大人の事情として汲み取る必要はあると思っています。

Well, if a company insist that "dark, cold, small, sepia-colored laboratory" is a "co-creation space", the company's image will be in ruin. So I think that I have to understand the background of the company.

-----

最近、私、ホワイトボードの自作に関して、色々公開しています。

Recently, I have opened about a DIY whiteboard.

自作ホワイトボード ―― 完結編

私の研究員人生における創作活動で、もっとも役に立ったものは、「ホワイトボード」です。

The most useful item in my research engineer's life, has been "whiteboard"

PCでもスマホでもプリンタでもスキャナでもなく、そして、多くの有能の同僚ですらも「ホワイトボード」には、敵いません。

It is not PC, smartphone, printer, and scanner. Moreover, even my competent colleagues cannot exceed "whiteboard"

「ホワイトボード」といえば、ブレストでの知識の共有ツールとしての利用が定番ですが、私の場合「自分との対峙」の為のツールです。

"Whiteboard" is a common tool to share knowledges in brain storming, however in my case, it is a tool to "fight me".

つまり、ある種類のアナログは、今もまだ、私にとっての最強ツールなのです。

In short, some of analog are the strongest tools for me still now.

2022/07,江端さんの技術メモ

// go run main3.go

/*
	(1)固定長配列を試してみる
*/

package main

import "fmt"

type LocInfo struct {
	Lon float64
	Lat float64
}

func main() {

	var Li [60]LocInfo // 要素0で初期化されている

	for i := 0; i < 60; i++ {
		Li[i].Lon = float64(i)
		Li[i].Lat = float64(i)
	}

	fmt.Println(Li)

	Li[32].Lon = 0.001
	Li[32].Lat = 0.001

	fmt.Println(Li)

}

未分類

// go get github.com/lib/pq を忘れずに
// go run main5.go

/*
	(1)適当な座標情報を入力して、近くのOpenStreetMapのnodeに強制的に寄せて、ダイクストラ計算を強行する方法
	(ここでは300メートル以内で、もっとも近いノードを見つける、という処理をやっている)
*/
package main

import (
	"database/sql"
	"fmt"
	"log"

	_ "github.com/lib/pq"
)

func main() {
	db, err := sql.Open("postgres",
		"user=postgres password=password host=localhost port=15432 dbname=utsu_db sslmode=disable")
	if err != nil {
		log.Fatal("OpenError: ", err)
	}
	defer db.Close()

	rows, err := db.Query("SELECT source, 
	x1 as longitude, y1 as latitude, ST_Distance('SRID=4326;POINT(139.9182893339256 36.573831584767085)'::GEOGRAPHY, the_geom) as dist FROM ways WHERE ST_DWithin(the_geom, ST_GeographyFromText('SRID=4326;POINT(139.9182893339256 36.573831584767085)'), 300.0) ORDER BY dist")
	if err != nil {
		log.Fatal(err)
	}
	defer rows.Close()

	for rows.Next() {
		var source int
		var longitude float64
		var latitude float64
		var dist float64

		if err := rows.Scan(&source, &longitude, &latitude, &dist); err != nil {
			fmt.Println(err)
		}
		fmt.Println(source, longitude, latitude, dist)
	}

	if err := db.Ping(); err != nil { //データベースが繋っているかの確認(らしい)
		log.Fatal("PingError: ", err)
	}
}

2022/07,江端さんの技術メモ

// go get github.com/lib/pq を忘れずに
// go run main9.go

/*
	(1)GolangでOpenStreetMap上にマップマッピングするプリミティブな江端式定番マッピング方法
	(http://kobore.net/over90.jpg参照)
*/

package main

import (
	"database/sql"
	"fmt"
	"log"
	"math"

	_ "github.com/lib/pq"
)

var source int
var longitude float64
var latitude float64
var dist float64

func rad2deg(a float64) float64 {
	return a / math.Pi * 180.0
}

func deg2rad(a float64) float64 {
	return a / 180.0 * math.Pi
}

func distance_km(a_longitude, a_latitude, b_longitude, b_latitude float64) (float64, float64) {
	earth_r := 6378.137

	loRe := deg2rad(b_longitude - a_longitude) // 東西  経度は135度
	laRe := deg2rad(b_latitude - a_latitude)   // 南北  緯度は34度39分

	EWD := math.Cos(deg2rad(a_latitude)) * earth_r * loRe // 東西距離
	NSD := earth_r * laRe                                 //南北距離

	distance_km := math.Sqrt(math.Pow(NSD, 2) + math.Pow(EWD, 2))
	rad_up := math.Atan2(NSD, EWD)

	return distance_km, rad_up
}

func diff_longitude(diff_p_x, latitude float64) float64 {

	earth_r := 6378.137
	// ↓ これが正解だけど、
	loRe := diff_p_x / earth_r / math.Cos(deg2rad(latitude)) // 東西
	// 面倒なので、これで統一しよう(あまり差が出ないしね)
	//loRe := diff_p_x / earth_r / math.Cos(deg2rad(35.700759)) // 東西
	diff_lo := rad2deg(loRe) // 東西

	return diff_lo // 東西
}

func diff_latitude(diff_p_y float64) float64 {
	earth_r := 6378.137
	laRe := diff_p_y / earth_r // 南北
	diff_la := rad2deg(laRe)   // 南北

	return diff_la // 南北
}

func main() {
	db, err := sql.Open("postgres", "user=postgres password=password host=localhost port=15432 dbname=utsu_rail_db sslmode=disable")
	if err != nil {
		log.Fatal("OpenError: ", err)
	}
	defer db.Close()

	rows, err := db.Query("SELECT seq,x1,y1 from lrt")
	if err != nil {
		log.Fatal(err)
	}
	defer rows.Close()

	x1, y1 := -1.0, -1.0
	_x1, _y1, _x2, _y2 := -1.0, -1.0, -1.0, -1.0
	px, py := -1.0, -1.0
	flag := 0
	f_flag := 0
	seq := -1

	for rows.Next() {

		if f_flag == 0 { // 初回だけ2二回入力
			if err := rows.Scan(&seq, &x1, &y1); err != nil {
				fmt.Println(err)
			}
			_x1, _y1 = x1, y1
			//fmt.Println(x1, y1)
			f_flag = 1
			continue
		}

		if err := rows.Scan(&seq, &x1, &y1); err != nil {
			fmt.Println(err)
		}
		//fmt.Println(seq, ",", x1, ",", y1)

		_x2, _y2 = x1, y1

		_, rad_up := distance_km(_x1, _y1, _x2, _y2)

		px, py = _x1, _y1

		for {
			// 5.56m/s → 時速20

			px += diff_longitude(0.00556*2*math.Cos(rad_up), py)
			py += diff_latitude(0.00556 * 2 * math.Sin(rad_up))

			//double rad0 = atan2((end_y - start_y),(end_x - start_x));
			//double rad1 = atan2((end_y - test_person.p_y),(end_x - test_person.p_x));

			rad0 := math.Atan2((_y2 - _y1), (_x2 - _x1))
			rad1 := math.Atan2((_y2 - py), (_x2 - px))
			// ここは、http://kobore.net/over90.jpg で解説してある

			if math.Abs(rad0-rad1) >= math.Pi*0.5 {
				// 終点越えの場合、終点に座標を矯正する
				px, py = _x2, _y2
				flag = 1 // フラグを上げろ
			}

			fmt.Println(px, ",", py)

			if flag == 1 {
				flag = 0
				_x1, _y1 = _x2, _y2
				break
			}
		}

	}

	if err := db.Ping(); err != nil {
		log.Fatal("PingError: ", err)
	}

}

未分類

// go get github.com/lib/pq を忘れずに
// go run main10.go

/*
	(1)golangの中でSQL文を作る時に、てっとり早く数値の部分を文字列にする方法
	(2)golangの可変長配列の作り方と、面倒くさい場所の値をひっぱり出す方法
*/

package main

import (
	"database/sql"
	"fmt"
	"log"
	"math/rand"

	_ "github.com/lib/pq"
)

func transfer_point(origin, destination int) (int, int) {
	// utsu_tram_db3をオープン
	db, err := sql.Open("postgres", "user=postgres password=password host=localhost port=15432 dbname=utsu_tram_db3 sslmode=disable")
	if err != nil {
		log.Fatal("OpenError: ", err)
	}
	defer db.Close()

	// node番号 1200 から 12000 までのダイクストラ計算を行う
	str := "SELECT seq, node, edge FROM pgr_dijkstra('SELECT gid as id, source, target, cost FROM ways'," + fmt.Sprint(origin) + "," + fmt.Sprint(destination) + ", directed:=false)"
	rows, err := db.Query(str)
	if err != nil {
		log.Fatal(err)
	}
	defer rows.Close()

	var seq, node, edge int
	var add_node_num = []int{} // 可変長配列

	for rows.Next() {
		if err := rows.Scan(&seq, &node, &edge); err != nil {
			fmt.Println(err)
		}

		// ルート分離は、0<x<70の値が出てきたら、駅のノードである、とする。
		// 何しろ、私が地図を改ざんしたのだから間違いない
		// で、その値を全部格納する

		if node > 0 && node < 70 {
			add_node_num = append(add_node_num, node)
		}
	}

	if len(add_node_num) >= 4 { // 見つけることができたら最初から2番目と、最後から2番目の番号(0 < X < 70)を取り出す
		first_node := add_node_num[1]
		last_node := add_node_num[len(add_node_num)-2]

		if (first_node > 0 && first_node < 70) || (last_node > 0 && last_node < 70) {
			return first_node, last_node
		} else {
			log.Fatal("wrong node:", err)
		}
		//fmt.Println("first_node:", first_node, "last_node:", last_node)

	} else { // 見つけることができなかったら
		return -1, -1
		//fmt.Println("No node")
	}

	return 0, 0 // ダミー用のリターン(ここには来ないはず)
}

func main() {
	fmt.Println(transfer_point(21509, 11215))

	for i := 0; i < 100; i++ {
		a := rand.Intn(30000)
		b := rand.Intn(30000)

		//fmt.Println(sub_main(2200, 2400))
		fmt.Println(a, b)
		fmt.Println(transfer_point(rand.Intn(a), rand.Intn(b)))
	}
}

2022/07,江端さんの技術メモ

// go get github.com/lib/pq を忘れずに

package main

import (
	"fmt"

	_ "github.com/lib/pq"
)

// GetLoc GetLoc
type GetLoc struct {
	ID    int     `json:"id"`
	Lat   float64 `json:"lat"`
	Lng   float64 `json:"lng"`
	TYPE  string  `json:"type"` // "USER","BUS","CONTROL
	POPUP int     `json:"popup"`
	//Address string  `json:"address"`
}

func person(gl2, gl3 *GetLoc) {

	if gl2.Lng > 0.0 {
		fmt.Println("pass1", gl2)
	} else {
		fmt.Println("pass2", gl2)
	}
}

func person_real() {
	var gl2, gl3 GetLoc

	gl2.Lng = 139.00

	person(&gl2, &gl3)

}

func main() {

	var gl2, gl3 GetLoc

	person(&gl2, &gl3)

	person_real()

}

2022/07,江端さんの忘備録

(私は投票を済ませてきましたが、)明日7/10日は、参議院議員選挙の投票日です。

(Though I have already voted before), tomorrow July 10 is the day to vote for the House of Councillors.

投票所に行く前に、思い出して頂きたいことがあります。

I would like you to remained you of the following incidents, before you go to vote.

■コロナ禍での政府自粛要請の渦中に、宴会やらかしていた政治家一覧(江端が拾ったものだけ)

- List of politicians who were having banquets during the government's restrict request in the corona disaster (only those picked up by Ebata).

『腹掻き切って、国民に詫びて見せろ』―― てな、時代錯誤的なバカげたことを書いてみてもよかったかな、とか、今なら思っています。

■政治資金収支報告書のオンラインシステムの使用した/使用していない団体の政治家一覧

- List of politicians from organizations that used/not used the online system for political fund balance reports

国会議員関係政治団体を政治家名で紐付けして、オンライン提出を無視している比率(オンライン提出無視率)を算出しました。

これは、政治家ではありませんが、厚生労働省の職員が、23人が東京・銀座の飲食店で会食していた事件もありましたね。

The following is not about politician, but there was also incident in which 23 employees of the Ministry of Health, Labor and Welfare had dinner together at a restaurant in Ginza, Tokyo.

官僚や政治家の組織は知りませんが、民間の企業では、この対応が普通です。

-----

先日、英国の首相が「政府自粛要請の渦中でのパーティ」の件で、ようやく辞任に追い込まれました。

The other day, the British Prime Minister was finally forced to resign during the party in the government restraint.

我が国の外交と内政、どちらも両方大切ですが、私たち有権者は『あの怒り』を思い出すことも大切な仕事です。

Both our country's foreign and domestic policy are important for us , but we also have to remained the anger at that time.

あなたが投票する候補者の「資質」や「ふるまい」を、事前に確認されることをお勧めします。

I strongly recommend to check the qualifications and behaviors of candidate you will vote beforehand.

『私たちを怒らせると、怖いぞ』ということを、これから政治家になる人には、覚えておいて貰わなければ困ります。

We have to teach the candidates who will the election that "if you make us angry we become furious enemies against you".

未分類

15分でホワイトボードを作った件

を使った、ホワイトボードをカメラで撮影しながらのリモート会議が「結構イケる」と判断しました。

そこで、ホワイトボードの購入の検討を開始したのですが、最大の問題は「収納」でした。部屋の中にも外に置く場所がありません。

最大の問題は、ホワイトボードの脚部の幅でした。

私の部屋の中で収納できそうな場所は、机の横にある20cmくらいの隙間しかありませんが、一般的なホワイトボードの脚部は、最小でも50cmはあります。

で、上記のメモに記載したように「室内物干し」で、かつ、脚の角度を変えれるようなものを探していたのですが、ようやく一つ見つけました。

(↑をクリックすると、商品のページに飛びます)

この商品、脚の部分の角度を変えることができます。

早速購入し、先程到着しました。

3分で組み上がりました。

ここに、ベニアで作ったホワイトボードを紐で括り付けます。

置き台を使って、ベニアを固定してしまいます(購入後に気がつきました)

で、懸案の収納ですが、問題なく収まることを確認しました。

これから、江端の参加するリモート会議では、このホワイトボードを濫用します。

以上

 

2022/07,江端さんの忘備録

印鑑変更の為に出向いていた銀行の待合室で、「演説中の元総理大臣に対する狙撃事件」を知りました(その後、殺害事件として確定)。

When I was in a waiting room at a bank for changing my notification seal, I knew ""sniper attack on the former prime minister during his speech".(The case was later confirmed as a "murder").

体を貫くような怒りで、自分が制御できなくなっているのを感じましたので、その後、夜の7時のNHKニュースまで、できるだけニュース媒体、特にSNSには接しないようにしていました。

I felt that I could not control myself because of my furious rage, and I decided not to touch any news, especially SNS until NHK news from seven o'clock.

このような大事件の後は、誤報やデマが飛び回り、そのような情報に振り回されることがあり ――

After such a major tragedy, I was anxious that I am going to be incontrollable by false news and demagogues.

なにより、今の私が、通常の精神状態を維持できていない(何を書き出すか分からない)、と自己判断したからです。

Above all, I was sure that I could not keep a normal state of mind right now (so I didn't know what I will write out).

-----

私は、日々、「コラムで、自分の思ったことや感じたことを、自由に書ける日常」を、心底『幸せだなぁ』と感じながら生きています。

I live to feel I am so happy that I can write what I am thinking and feeling freely in my daily life.

こういう権利を獲得するまでに、多くの先人が闘ってきてくれたことに、本当に感謝しており ――

I deeply thank many predecessors who have fought to win these rights, and

そして、こういう権利を維持する為の行為(選挙権の行使)を、みすみすドブに捨てる奴を、心底軽蔑しています。

I deeply despise those who would throw away the act (exercising the right to vote) from my bottom of my heart.

私たちの既得権益を守り、膨大な負の遺産を次世代に押しつけて、逃げ切りましょう。

-----

私は、選挙を、単なる人選システム、とは考えていません。

I don't think that election is just a system to elect candidates.

選挙とは、

Elections are

■日本国民全員に対する大規模インタビューであり、

- the biggest interview with all Japanese public

■日本というペルソナを計測する重要なイベントであり、

- the most important event to measure the persona of named "JAPAN"

■「日本国の人間ドック」である、

- the physical examination of JAPAN

と考えています。

I think so.

今回のテロ事件によって、この計測値は大きく変動するかもしれませんが ―― それでも、その計測結果が、今後の私たちの総意として取り扱われていくことになります。

The measure values might be changed dynamically by this terrorist attack, however, the result of measure is going to be treated as "our will".

-----

私は「選挙への投票」とは、「言論の自由に対するテロへの抗議行動」で(も)ある、と(勝手に)思っています。

I (selfishly) believe that "voting in elections" is (also) "protesting terrorism against freedom of speech".

『我が国のテロへの抗議の意思を、"投票率"という"数値"で見せてもらおうではないか』 ――

Show me our country's willingness to protest terrorism in the "numerical" form of "voter turnout"

今は、そんな風に考えています。

Now I am thinking so.

2022/07,江端さんの忘備録

前回の選挙から始めた、私のキャンペーン

I have already published my policy about election in Japan since the previous election, as follow.

政治に興味のない方、特に、若い世代の方は、今日も"Stay Home"で、投票はボイコットしましょう。

ですが、今回も、皆様、ご協力をよろしくお願いいたします。

This time too, I ask you the cooperation about my activities.

-----

私の試算では、今の日本の状態であれば、私が死去するまでの間であれば、ギリギリ我が国の財政は維持されます。

According to my estimation, if we keep current state of Japan, our country's finance will be just barely maintained until my death.

ここで、若い人たちが、自分達の未来を真剣に考え出すと ―― これから年金生活に入る私が、非常に困るのです。

If the youth come to think their future seriously, I, who am about to start pension life, am in great trouble.

できるかぎり、私は、若年や壮年世代に、政治に関心を持たないで頂きたいのです。

I hope the youth and middle generations are not interested in politics, as much as possible.

-----

比して、高齢者の皆さんは、何がなんでも投票に行きましょう。

In comparison with the above, the elders should go to vote at all cost.

穏健で、現状の政権をダラダラと維持して、新しいことや挑戦を避ける選挙人や政党を守り抜きましょう。

We have to save the candidate and the parties who are moderate, conservative and want to keep the current status, and crash new ambitious challenges.

私たちの既得権益を守り、膨大な負の遺産を次世代に押しつけて、逃げ切りましょう。

Keep our vested interests and get away with pushing negative legacy on the next generation.

忘れてはなりません ―― 私たち高齢者は、我が国の最大の票田なのです。

In addition, never forget that we, the elders, are the biggest vote field in Japan.

だからといって、『ほっといても、私たちは勝てる』などと油断してはなりません。

However, we should never relax our guard with saying "even if we leave us alone, we will win".

若い世代や働きさかりの世代を、踏み台にして、私たちは、私達の安全・安心な老後を、堅固なものにするのです。

Making the younger and working generations as a footstool , we have to ensure that our safe and secure retirement is solid.

投票日は、7月10日です。お忘れなく。

The vote day is July 10th, the next Sunday. Don't miss it.

-----

私の選挙に関するコラムは、こちらに色々あります。興味があれば、どうぞ。

There are some Ebata's columns about election. If you are interested, go ahead.