Express.js:
Express can use a template engine to render dynamic pages with information that differs with each request.
There are several engines to choose from but let's start with EJS.
First install EJS in your project:
英語だったり Sometimes, in English; 日本語だったり mostly, in Japanese
Express can use a template engine to render dynamic pages with information that differs with each request.
There are several engines to choose from but let's start with EJS.
First install EJS in your project:
インストール完了後:
起動時(電源入れたとき)、どちらかのOSを選ぶには Option キーを押しながら起動。
Contacts, Reminder, Calender, KeyChain 等、普段から iPhone ともクラウドで共有しているものは移行する必要はなし。
~/Library/Group Containers/group.com.apple.notes
から
上記ファイルを抜き出して、新しいMacに移動させれば、完了。
ブラウザーを使わないでJavaScriptを実行できる環境(だと理解してますが、、、間違っているかも・・・)Node.js というのを試してみた。
最近はWeb開発や自動化などに利用されることが多いとか。
Node.js is a run-time engine that executes JavaScript code outside a browser. Originally intended as a web server, but also commonly used for web development tools and automation.
https://nodejs.org/en/からWindows版をダウンロードして全てディフォルトでインストール:
簡単なWebサーバーを立ち上げ:
import http from 'http';
http.createServer((req,res) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Aloha world');
}).listen(process.env.PORT || 3000);
node.js をインストールすると、npm というパッケージ化ユーティリティ(だと思う。。。)が入っていたので、npm init でパッケージも作成してみた。
package.json
index.js
コマンドラインから下記のように走らせる:
Node.js can also execute JS files from the command line like:
$ node index.js
http://localhost:3000でつないでみたら、正しく表示されたので動いていることを確認できました。
昔はサービス再起動は service restart httpd のようにしていたが、いつのまにか sudo systemctl restart httpd という風に変わっていたので、いつ変わったのか AI に聞いてみた。
The change from the service
command to systemctl
in Linux occurred with the adoption of systemd as the default init system, replacing the older SysVinit system.
systemd
was first introduced in 2010 by Lennart Poettering and Kay Sievers as an alternative to SysVinit.systemd
as its default init system in Fedora 15 (released in May 2011).systemd
as the default init system starting with Debian 8 (Jessie), released in April 2015.systemd
as the default init system with Ubuntu 15.04 (released in April 2015).The change to systemctl
was made to take advantage of the features and improvements that systemd
brings over the older SysVinit system, including:
systemctl
.journalctl
.While service
was part of the older SysVinit system, systemctl
is part of the systemd
system and is now the recommended tool for managing services on most modern Linux distributions.
systemd
, the service
command is still available as a wrapper around systemctl
for backward compatibility. However, using systemctl
directly is the preferred method now.コミュカレでイントロ Java の授業を取っていてだされた宿題に LeetCode 567 Permutation in String に近いものがあったのでトライしてみた。
11.2.1: LAB: All permutations of names
Write a program that lists all ways people can line up for a photo (all permutations of a list of Strings). The program will read a list of one word names into ArrayList nameList
(until -1), and use a recursive method to create and output all possible orderings of those names separated by a comma, one ordering per line.
replit というブラウザ・ベースの IDE を使う機会があったので備忘録として。
元々、スマフォでもコーディングしたいということでスタートしたらしいですが、AI もインテグレートされていて便利ですな。
新規で Repl を作成:
環境を選択:
普通に使えます。Git 環境もあり:
別に自分の PC のローカル開発環境でも十分ですが、何も構築しないでブラウザーですぐに始められるというのはGood:
自分の リモートGithubを指定:
勝手に repo 作ってくれます:
Git add、commit、push もコマンドでなくても可能: