Featured Partner Articles Cloud cost optimization best practices Read moreHow to choose a cloud provider Read moreDigitalOcean vs. AWS Lightsail: Which Cloud Platform is Right for You? Read more
定義済みの変数 PHPは、実行する全てのスクリプトに定義済みの多くの変数を 提供します。しかし、これらの変数の多くは、 実行するサーバーの種類、サーバーのバージョンおよび設定、 その他の要素に依存しており、完全に記述することはできません。 これらの変数のいくつかは、PHPを コマンドライン で実行した場合には利用できません。 これらの変数の一覧については、 定義済の変数 のセクションを参照ください。 PHP には、(使用する場合)Webサーバー、環境変数、 ユーザー入力からの変数を値とする定義済みの配列が追加されています。 これらの配列は、自動グローバル、すなわち、自動的に全ての スコープで利用可能であるという点でかなり特別です。このため、これらは "スーパーグローバル" といわれることもあります。 (PHPには、ユーザー定義のスーパーグローバルという機構はありません。) スーパーグローバ
dnf / yum で プロキシを使いたい。 普通はプロキシを使うなら、次のコマンドをシェルでたたき環境変数を追加したら、シェル経由のネットワークコマンドははコレを使うんだけど。 環境変数だとうまくいかない。。 export http_proxy=http://proxy.example.com:8080/ #yum はこれを見てくれない debian / ubuntu の apt なんかはコレで行けたんですどねー yum / dnf は シェルの環境変数を考慮してくれない。 そうなんです。驚きました。プロキシを使うには /etc/{dnf,yum}.confに設定を書かないといけない /etc/{dnf,yum}.conf [main] proxy=http://proxy.example.com:8080/ このように書きます。 また、ユーザー名やパスワードが必要な場合は [main]
インフラの環境構築を行ったときに、はい、環境です、と接続情報だけ顧客に提供したところで、そのまま受け取ってくれることはない。 ドキュメントはないんですか?。 何を作ったかを示すドキュメントとセットで初めて、プロにお金を払って仕事をしてもらった気持ちになる。今でも、ドキュメントを残せ、ドキュメントがないと今どうなっているかがわからなくなる、常に更新して最新にしよう、そんな掛け声は健在である。 このドキュメント、年々複雑さが増していると思う。というのも、IT関連のソフトウェアにしろクラウドにしろ、機能は増えるばかりだからだ。かつ、設定自体は年々洗練されており、デフォルト値で動くことも多い。たくさんの設定項目があるが、設定するのはほんの一部分である。 ドキュメントに何を残すべきか。設定値全てをドキュメントに書き込もうものなら莫大な量になる。一方で変更したものは少ししかない。このギャップが激しくな
何が大変か? VSCodeはMSが作っているだけあってTypeScript統合がほぼ整っており、特に設定を頑張らなくてもそのままIDE機能が効くことが多いです。現代の多くのJavaScriptプロジェクトはこれで事足ります。 しかし、これには例外があります。Reactの実装は現時点ではFlowで書かれています。FlowはTypeScriptと同様のコンセプトを持つAltJS言語です。FlowはReactと同じくMeta(Facebook)製であるため、これまでReactでFlowが使われてきたのは一定の合理性があると言えるでしょう。 Flowの拡張子が *.js であることから、TypeScriptのIDE機能はFlowのソースコードに対しても反応します。文法が似ていることもあり、Go To Definitionなどの機能もある程度までは動作しますが、完全ではありません。また、エラー表示が
福田(@JunyaFff)です。今月の「Python Monthly Topics」は、最近私が個人的に気になっている静的コード解析ツールRuffについて紹介します。 どんなプログラミング言語でも、静的コード解析ツール(リンター)やフォーマッターは非常に便利です。Pythonでコードを書く場合、皆さんはどんなツールを使っているでしょうか?Flake8やBlack、isortなどが人気で、世界中で多くのPythonエンジニアに利用されています。 Ruffは2022年8月にリリースされた比較的新しい、Pythonのリンター兼フォーマッターです。Ruffはリリースからまだ半年足らずしか経っておりませんが、多くの著名なライブラリで採用[1]され、毎日のようにアップデートされています。2023年3月時点でのRuffの使い方、そしてこれからの発展について、本記事で紹介します。 Ruffとは? ここでは
Windowsを始め、Unixの影響を受けているOSが持つ機能に環境変数がある。環境変数は、実行するプログラムに対してなんらかの情報/パラメーターを与える方法。1979年に作られたVersion 7 Unixに搭載され、Unixの基本的な機能の1つとして今でも使われている。 プログラムに対して情報やなんらかのパラメーターを与える方法にはコマンドラインがあるが、環境変数は事前に定義しておくもので、複数回実行されるプログラムに常に同じ情報/パラメーターを指定する。あるいは、デフォルト値のように常に情報/パラメーターを指定するといった使い方をすることが多い。 典型的なUnix系のコンソールアプリケーションでは、コマンドラインのオプション指定の一部を環境変数から受け取ることができるものが多い。 Windowsでも、cmd.exeの組み込みコマンドである「dir」は、「DIRCMD」という環境変数か
導入ガイド I. システムの基本設定 Expand section "I. システムの基本設定" Collapse section "I. システムの基本設定" 1. キーボードの設定 Expand section "1. キーボードの設定" Collapse section "1. キーボードの設定" 1.1. キーボードレイアウトの変更 1.2. キーボードレイアウト表示器の追加 1.3. 一休みの設定 2. 日付と時刻の設定 Expand section "2. 日付と時刻の設定" Collapse section "2. 日付と時刻の設定" 2.1. 日付/時刻のプロパティのツール Expand section "2.1. 日付/時刻のプロパティのツール" Collapse section "2.1. 日付/時刻のプロパティのツール" 2.1.1. 日付と時刻のプロパティ 2.1.
Windowsパソコンを使っていると、稀に立ち上がらなくなる場合があります。 ここではそのような状況の中で「Windows Boot Manager」が表示されなくなる場合の対処方法について説明します。 【PR】 従来は最初のドライブのMaster Boot Recordに書き込まれたプログラムを使ってWindowsなどのOSを起動する方式でした。 しかし、Windows 7の64ビット版以降、BIOSがUEFIに対応するようになり、Windows 8.0以降の殆んどのWindowsはUEFIでBOOTするようになりました。 UEFIとはUnified Extensible Firmware Interfaceの略でBIOSに置き換わるものなのですが、UEFIに対応していても未だにBIOSという呼ばれ方もしています。 Microsoft SurfaceのBIOSは「Surface UEFI
概要 gradle run で実行する Java アプリケーションのコマンドライン引数は --args で指定することができる (Gradle 4.9 移行から可能) たとえば gradle run --args="aaa bbb ccc" のように指定することで Java のメインクラスの main メソッドに文字列の配列のパラメータをセットできる Gradle 4.9 より前では run タスクが実行される前処理を build.gradle に記述することで対処していた 記述例 aaa bbb ccc の3つの引数を指定する例。 公式情報 The Application Plugin Since Gradle 4.9, the command line arguments can be passed with --args. For example, if you want to la
CentOS での systemd のユニットファイルの作り方についてです。 自作サービスが定義できるので、systemctl start myservice のような使い方ができるようになります。 /usr/lib/systemd/system/ はパッケージが提供するサービスのファイルを配置する場所で、 /etc/systemd/system/ はシステム管理者がサービスのファイルを配置する場所です。 自作のサービスを作りたい場合は /etc/systemd/system/ の下にファイルを配置します。 参考までに Apache HTTP Server のサービスファイル /usr/lib/systemd/system/httpd.service の内容は次の通りです。 [Unit] Description=The Apache HTTP Server After=network.ta
Windows で Linux GUI アプリケーション (X11 と Wayland) を完全に統合されたデスクトップ エクスペリエンスで実行するための Linux 用 Windows サブシステム (WSL) のサポートをプレビューできるようになりました。 WSL 2 により、Windows 上での Linux GUI アプリケーションの使用がネイティブで自然に感じられるようになります。 Windows の [スタート] メニューから Linux アプリを起動する Linux アプリを Windows のタスク バーにピン留めする Alt + Tab キーを使用して Linux アプリと Windows アプリを切り替える Windows アプリと Linux アプリ間で切り取りと貼り付けを行う Windows と Linux のアプリケーションの両方をワークフローに統合し、シームレス
Linuxは、標準機能や膨大な数のフリーソフト、Linuxならではの多彩なコマンドラインツールを使うことで、より便利にカスタマイズできる。この特集では、そうした数々の「便利ワザ」を紹介する。それぞれの難度は、簡単に使いこなせる「Lev.1」からある程度の専門知識が必要な「Lev.3」の3段階のレベルで示している。 7 ファイル名をコマンドでまとめて変換する(Lv.2) コマンドでファイル名を変更する場合、通常はmvコマンドを使います。しかし、変更するファイルが多いと手間がかかります。「rename」コマンドを使うと、複数のファイルの名前を一括変換できます。 renameコマンドは次のコマンドでインストールします。
説明psqlとはPostgreSQLのターミナル型フロントエンドです。 対話的に問い合わせを入力し、それをPostgreSQLに対して発行して、結果を確認することができます。 また、ファイルから入力を読み込むことも可能です。 さらに、スクリプトの記述を簡便化したり、様々なタスクを自動化したりする、いくつものメタコマンドとシェルに似た各種の機能を備えています。 -a --echo-all読み込んだ全ての行を標準出力に表示します。 これは対話式モードよりもスクリプト処理の際に有用です。 ECHO変数をallに設定するのと同じ意味を持ちます。 -A --no-align位置揃えなしの出力モードに切り替えます (デフォルトの出力モードは位置揃えありです)。 -c command --command=commandpsqlに対し、commandという1つのコマンド文字列を実行し、終了するよう指示しま
はじめに 今回の記事では、私の独断と偏見でこれから学ぶべきTypeScriptフレームワークを4つ徹底解説する。今回の記事を参考に、TypeScriptを深く学ぶことにつながれば幸いである。TypeScriptが使われているフレームワークは数多く存在するので、何から手を付ければいいのかわからない人も少なくないだろう。もしこの記事を読んでいるプログラマーがTypeScriptのフレームワークを選んでいるのに悩んでいたら、今回の記事は参考になるはずだ。 あくまで個人の一見解に過ぎないが、参考になれば幸いである。 これから学ぶべきTypeScriptフレームワーク Next.js Nuxt3 NestJS SolidJS それぞれ順番に解説する。 1.Next.js Next.jsはReactベースで開発されたTypeScriptフレームワークである。最大の特徴は、URLルーティングと呼ばれるリ
GitHubは、同社が管理するJavaScriptパッケージリポジトリnpmにおいて、以下のようなセキュリティ機能関係の改善を発表した。 npmコマンドラインインターフェースによる、ログインおよびパブリッシュの効率化 npmへの2FA(2要素認証)の導入により、利用者はログイン時やパッケージ登録時に煩雑な操作を行う必要があったが、npm8.15.0より、ログインおよびパブリッシュの認証をブラウザ上で管理することができ、既存セッションを使用してログインする場合は2要素めの認証を省くことができるようになった。またパブリッシュの場合も、–auth-type=webフラグによりオプトインして使用する場合は2FAを5分間回避できる(npm9からはデフォルトで実装)。 GitHub/Twitterアカウントからnpmへ接続可能に npmのアカウントをGitHubアカウントやTwitterアカウント
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く