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

Go言語でエージェントシミュレータを作るのに必要なパーツを作っています。

エージェントをオブジェクト風に作って、配列にいれて、終了したら、エージェントを消滅する。

package main

import (
	"fmt"
	"math/rand"
)

type person struct {
	number          int     // 番号
	mental_strength float64 // 勧誘に屈しない強さ
}

var p_array []*person // personの配列

func person_create(num int) *person {
	p := new(person)
	p.number = num
	p.mental_strength = rand.Float64() // 勧誘を断わる強さ
	p_array = append(p_array, p)       // 配列に放り込む
	return p
}

func (p *person) person_destroy() {

	for index, v := range p_array {
		if v == p {
			fmt.Println("hit")
			p_array = append(p_array[:index], p_array[index+1:]...)
			break
		}

	}

	p = nil //これでいいのかな?
}

func main() {
	_ = person_create(0)
	p1 := person_create(1)
	p2 := person_create(2)
	_ = person_create(3)

	for index, v := range p_array {
		fmt.Println(index, ":", v, v.number, v.mental_strength)
	}

	p2.person_destroy()

	for index, v := range p_array {
		fmt.Println(index, ":", v, v.number, v.mental_strength)
	}

	p1.person_destroy()

	for index, v := range p_array {
		fmt.Println(index, ":", v, v.number, v.mental_strength)
	}

}

■出力結果

PS C:\Users\ebata\cult> go run main.go
0 : &{0 0.6046602879796196} 0 0.6046602879796196
1 : &{1 0.9405090880450124} 1 0.9405090880450124
2 : &{2 0.6645600532184904} 2 0.6645600532184904
3 : &{3 0.4377141871869802} 3 0.4377141871869802
hit
0 : &{0 0.6046602879796196} 0 0.6046602879796196
1 : &{1 0.9405090880450124} 1 0.9405090880450124
2 : &{3 0.4377141871869802} 3 0.4377141871869802
hit
0 : &{0 0.6046602879796196} 0 0.6046602879796196
1 : &{3 0.4377141871869802} 3 0.4377141871869802

未分類

エージェントのログトラッキングによって過負荷が発生→一時的に機能を削減

ジャンピングを確認 →

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

最近、体重が増えています。

Recently, my weight is increasing.

私、体重管理には、自信があったので、ちょっと困惑しています。

I have been confident in "the precision weight control", so I am a bit puzzled.

視力検査とは、「目」で見るのではありません。「心」で計算するものです。

思い当たることがあるとすれば、「筋トレ」でしょうか。

If I had to guess, I would say "muscle training".

上記の経て、「江端マッチョ化計画」・・・もとい、「江端介護向け身体改造計画」を進めております。

今は、懸垂20回、腹筋20回、背筋50回を、負担を感じない程度に、ダラダラと、不真面目に、一日2セットやっています。

Right now, I'm doing 20 pull-ups, 20 sit-ups, and 50 back-ups, lazily and unseriously, two sets a day, as long as I don't feel overburdened.

体がマッチョ化している訳でないですが、贅肉の下で筋肉が製造されているに違いない、と思っています。

My body is not macho-style at all, but I believe that muscle has been manufactured under the fat.

筋肉は脂肪よりも20%ほど重いそうです。

I heard that muscle is 20% heavier than fat.

この「隠れ筋肉」が理由でないとすると、私の体重管理方式が破綻していることとなり、由々しき問題です。

If this "hidden muscle" is not the reason, then my weight management system is out of order, which is a venerable problem.

-----

まあ、そう考えないと食事がまずくなるので、そう思い込んでいます。

I believe it, because the meal will be bad if I don't think so.

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

ですから、現職の大臣や国会議員が、選挙で「統一教会の組織票」を使っていたことなど、『スイーツに一瞬とまったハエ』程度の、本当に、本当に、本当に、ささいな話 ―― なのかもしれません

『近親者のみで、ひっそりと行う国葬』

Therefore, a existing minister or members of the Diet used the "Unification Church's organizational votes" in an election, may be a really, really and really small matter, like "A fly on the cake for a moment".

―― と書いていたのですが、どうやら、多くの人にとっても、これは「ささいな話」ではなかったようです。

-- but apparently, this was no "trifle" for many people either.

最近、世論調査を見ると、自分の考えが世間とズレが生じているな、と感じることが多いのですが(まあ、昔からそうかな)、この件に関しては、私は「外していなかった」という感じです。

Lately, when I look at polls, I often feel that my opinion is becoming misaligned with the public (well, I guess it always has been), but in this case, I feel that I was not off the hook.

ちょっとだけ、安心しています。

I am a little bit relieved.

-----

元総理大臣の国葬については、『国葬はどうあるべきか』を論じるのが正しく、故人に対する好感や嫌悪で判断すべきではありません。

Regarding the former prime minister's state funeral, it is right to discuss 'what a state funeral should be like,' and should not be judged based on liking or disliking the deceased.

国葬とは、国家行事であり、故人に対する弔意を示すものであり、我が国の有り様を国内外に示す重要なイベントであるからです。

A state funeral is a national event, an expression of condolence for the deceased, and an important event that shows the state of our country to people in Japan and abroad.

―― と、それは、十分に分かっているんですが、

I know it well though,

以前も記載した通り、

As I wrote the following,

『統一教会に関連する団体の集会での前首相のスピーチを見て、さーっと気持ちが白けてきてしまいました』

However, after watching the video-clip of the former prime minister's speech on an organization related to "Unification Church", it came to spoil me.

と、いうように、今の私は、『弔意の気持ちが、1mmも残存していない』という状況です。

Now I have no condolence.

政府の言う国葬経費は、私の試算と1ケタ違いますが、予算というのは、見せ方(対象、日数、範囲)でどのようにも金額を変えることができますので、私は、この件について論じないことに決めました。

―― 安倍元首相「国葬」経費 約2億5000万円支出を閣議決定。 これ本当? めちゃくちゃ安くない?と思いました。

The government's estimate of state funeral expenses differs from my estimate by one digit, but I have decided not to discuss this matter because the budget can be changed in any amount depending on how it is presented (subject, number of days, scope).

-----

今の私は、「賛成」とか「反対」とかを越えたもっと酷い気持ち ――

Now I have a more brutal feeling that goes beyond "for" or "against".

『あの人は、最初から"いなかったこと"にしよう』

"Let's pretend he was never there from the first"

という虚無感に至っています。

I am feeling such the emptiness.

本当に、『あのスピーチのビデオクリップさえ見なければなぁ』と思います。

I really wish I hadn't seen that video clip of the speech.

(ちなみに、毎日にように出てくる、与党議員の宗教団体でのパーティの映像でも、同じ気持になっています。タイムマシンがあったら、『絶対に、あの政党には投票するな』と自分に告げに行きます)

(Incidentally, I feel the same way about the images that appear daily of the ruling party members at the religious parties. If I had a time machine, I would go tell myself, 'Never, ever vote for that party.)

-----

ともあれ、今の私は、今回の国葬について、ロジカルな話ができそうにありません。

Anyway, I am not going to be able to talk logistically about this state funeral now.

それ故、今回の葬儀につきましては、『首相のお好きにされたらいい』と思っています。

Therefore, regarding this funeral, I think 'the Prime Minister will do it as he wants'.

本葬儀に関しては、首相がほぼ独断で決定されたようですが、それでも我が国の行政府のトップの決断です。

Although the decision regarding this funeral seems to have been made almost single-handedly by the Prime Minister, it is still the decision of the head of our country's executive branch.

私は、その判断に一定の理解を示して良いと思います。

I think I can show a certain understanding of his decision.

というか ―― 正直なところ、もはや、私にとってどーでもいい人が、どのように取り扱われようが、私は心底から『どーでもいい』のです。

I mean -- to be honest, I no longer really 'care' how people who don't matter to me are treated with any way.

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

昨日、

Yesterday, I wrote again,

―― 努力は才能を越えない

"Ability counts for more than effort."

という話を、再度致しましたが、これも合わせてお話すべきでした。

However, I noticed that I had to add the following.

―― 狂気だけが才能を越える

"Only madness surpasses talent"

-----

これについても、何度もお話してきましたが、

I also wrote the story again and again.

『自分の視点でのみで世界が完結し、そこに他者の思惑や常識は介在しない』 ―― というレベルの狂気は、無敵なのです。

"The level of insanity where the world is complete only from my point of view, and the thoughts and common sense of others do not intervene" is invincible.

以前、私は、この狂気を「おたく」という概念を使って論じていました。

I used to discuss this madness using the concept of "otaku".

私は『アニメおたく』ではないようですが、長く生きているからこそ得られる感動が、アニメにもあります。

-----

ちょっと調べてみたら、私は、

I did a little digging and found that I seemed to be saying,

―― 天才とは狂気のことである

Genius is equal to be madness.

とまで言い切っていたようです。

そういう挑戦をしている人間を、私達、多くの凡人は『黙って看過する』ことすらできないのです ―― 自分に、1mmも不利益がないにもかかわらず。

-----

今日の日記は、ちょっと纏まりがありません。

Today's diary is a little less organized.

I just tried to reconfirm my policy of

『人生をどう生きたところで、大して変わりはない。ただ、狂えるものがあれば、ちょっとだけ"おトク"かもしれない』

"No matter how you live your life, it doesn't make much difference. However, if you have something to be crazy about, it might be a little bit "good" for you"

という、私のポリシーの再確認をしただけです。

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

一昨日、たまたま、Amazonプライムで「十二単衣を着た悪魔」という映画を、なにげなく視聴していたのですが、『これは、久々のヒットだ』と思いました。

The day before yesterday, I happened to be casually watching a movie called "The Devil Wears Twelve Clothes" on Amazon Prime, and I thought, 'This is a hit for a long time'.

早速、原作を求めて、コミック、アニメと探したのですが、見つかりません。

I immediately searched for the original story, comic and anime, but could not find it.

もしかしたら、と思いつつ、書籍の方を探してみたら ―― 当たりました。

I looked for the book to see if it might be possible, and I hit it.

で、そのまま図書館に予約を出したら、即日でやってきて、何年かぶりに「一日での一気読み」をやってしまいました。

After the reservation to the city library, the book came to me in the same day, and for the first time in years, I did a "read in one day".

-----

私は、源氏物語の登場人物の、ほぼ全員を把握しています。

I know almost all of the characters in The Tale of Genji.

これは、私が源氏物語の研究に精通しているからではありません。

This is not because I am an expert in the study of the Tale of Genji.

ティーンエイジャの頃に、大和和紀さんのコミック「あさきゆめみし」を読み込んだだけです。

I just read Kazuki Yamato's comic "Asaki Yumemishi" when I was a teenager.

「あさきゆめみし」のお陰で、私の源氏物語の『通り一遍の知識』は、万全といっても過言ではありません。

Thanks to "Asaki Yumemishi," my "cursory knowledge" of The Tale of Genji is complete.

-----

それにしても、このコンテンツ、「時空間モノ」ということ以上に、『弘徽殿女御を、こう描くかぁ・・・』と、久々に目から鱗の落ちる思いです。

This content is a good "time-space thing" however, it is also a "how to depict Lady Koukiden in this way..." It has been a long time since I have seen the light

基本的に、私、心情的に「アンチ光源氏」なのですが、

Basically, I am emotionally "anti-Hikaru Genji, and

―― 努力は才能を越えない

"Ability counts for more than effort."

を、再度思い知らされるコンテンツでした。

The phrase reminder me it again.

"誰でも自分を自覚するべきだ。でないと。……見ている側が馬鹿馬鹿しい"

 

 

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

本日、お約束していた「オリジナル原稿」をリリースしました。

Today, I released the "original manuscript" that we had promised.

―― 『とある宗教団体』を直撃する内容

もし、申し込みして頂いたのにもかかわらず、メールが届いていない人がいらっしゃったら、

If you have signed up but have not received an email, please contact me again,

■「迷惑メール」等のフォルダに転送されていないかご確認された上で、

- after checking to make sure that the mail has not been forwarded to a folder such as "junk mail"

再度、こちらにご連絡下さい。

using this mail address.

-----

当初、『PDFファイルを公開すればいいかなぁ』と思っていました。

Initially, I thought, 'Why don't I just publish a PDF file?

けど、『それも芸がないなぁ』と思い、Webページを作成したのですが ―― 酷い目に合いました(丸一日持っていかれました)。

However, I didn't think that it is not cool, so I tried to make my original web page. But it was "terrible"(I spent the whole day)

■ホームページを丸ごとダウンロードできる便利ツールHTTrack(WinHTTrack) を使って、EE Times Japanのスタイル のサンプルを作ってみた件

ホームページを丸ごとダウンロードできる便利ツールHTTrack(WinHTTrack) を使って、EE Times Japan風のスタイルサンプルを作ってみた件

-I made a sample of EE Times Japan's style using HTTTrack (WinHTTrack), a convenient tool that allows you to download an entire homepage.

■さくらのレンタルサーバでの「ベーシック認証」は、自力でやらず、サーバーコントロールパネルを使うこと

- Do not try "Basic Authentication" on Sakura rental servers by yourself, but use the server control panel.

さくらのレンタルサーバでの「ベーシック認証」は、自力でやらず、サーバーコントロールパネルを使うこと

-----

まあ、私が、丸一日費しても、このページを作った真意は、ただ一つです。

Well, the true reason who I created the pages even if I spent the whole day, was

あなたに、

I wanted to tell you,

―― 統一教会の運営は、(自分の全財産を自分の意思で差し出せるような)狂信的な信者を”作り出せる”か否かにかかっている

The management of the Unification Church depends on whether or not it can "create" fanatical believers (even if who are willing to give up their entire wealth).

を、伝えたかったから、です。

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

先日、リモート会議で、研究ユニットのメンバから「犯罪学」に関する発表を聞きました。

I recently heard a presentation on "criminology" from a member of our research unit at a remote conference.

ちょうど良い機会なので、質疑の時間に、

I thought it was just the right opportunity to ask a question during the question period.

―― 私、結構な頻度で、『職務質問』されるんですけど、良い対策方法ってありますか?

"I am being "questioned on duty" quite often. Is there any good countermeasure?"

と質問してみました。

不思議なのですが、ネットワークの向こう側であっても、『メンバーがどん引き』しているのを感じることができました。

It's strange, but even on the other side of the network, I could feel the 'members' was put off by what I said.


英国入国

私の入会を許諾してくれる「珍走族」の方、いらっしゃいましたら、ご連絡下さい。

大抵の人にとって、「職務質問」という言葉は、単なる概念として一生を終えると思います。

女子中学生の拉致を計画しているテロリストが、少しづつ近付いてきている 

―― 江端の禁酒って、改宗?

写真なんかとったら、直ぐに取り抑えられそうでしたし、正直、立ち止まることすら躊躇されました。

海外出張に行くあなたは、「たった一人の軍隊」である 

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

さくらのレンタルサーバでの「ベーシック認証」は、自力でやらず、サーバーコントロールパネルを使うこと

特定のディレクトリのみベーシック認証を実施したかったのですが、

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

から逃げられず、どうして良いのか分からなかったのですが、どうも、これ、プロバイダ側の原因(仕様変更)らしいと分かってきました。

で、今、動いたようなので、忘れない内に、私の為に、メモのみ残しておきます。

これで,".htpassword"が生成されます。

これを操作すると(内容は忘れた)、".htaccess"が生成されます。

いずれにしても、「手動で作る」ことは諦めた方がいいです。

以上