Linux

Thumbnail of post image 046

#du -hc ファイル名
テキストファイルのみの合計を求めたいなら、
#du -hc *.txt

SQL

Thumbnail of post image 136

最大の枝番を持つデータを取得するSQL

伝票データなどで変更履歴を枝番付加することで残しているデータの枝番最大(=最新)のみ取得したい場合があると思います。
このような場合、サブクエリで伝票毎に枝番最大行を取得し、その結果をもと ...

SQLServer

Thumbnail of post image 171

SQLServerを緊急モードにする。
ALTER DATABASE SET EMERGENCY
ALTER DATABASE SET SINGLE_USER
CHECKDBを実行。
DBCC CHECKD ...

Java

Thumbnail of post image 192

クラスパス上のプロパティファイルの内容をPropertiesクラスのオブジェクトに読込み保持します。
シングルパターンを実装しており、プロパティファイルの読込は初回のインスタンス取得時のみ行います。

Classクラ ...

Linux

Thumbnail of post image 174

マウントポイントを作成。
#mkdir/mnt/samba

マウント
#mount -t cifs -o username=ユーザ名,password=パスワード//ファイルサーバのIPアドレス/共有ディレ ...

Linux

Thumbnail of post image 066

Apache2.4のconfigure実行時に
configure: error: pcre-config for libpcre not found. PCRE is required and available from ...

Linux

Thumbnail of post image 180

Apache2.4のcounfigure実行時に「configure: error: APR not found.」と表示された場合、
Apach Portable Runtime Projectから、apr-1.5.0.ta ...

Linux

Thumbnail of post image 106

CentOSでconfigureを実行した際にconfigure: error: a working C++ compiler is requiredと
表示されて場合、gccがc++に対応していないので、gcc-c++をイン ...

Linux

Thumbnail of post image 026

bzip2形式のファイルを解凍するには以下のコマンドを使用する。
#tar jxzf ファイル名.tar.bz2

Linux

Thumbnail of post image 049

mod_sslのインストール
#yum install mod_ssl

サーバー用秘密鍵、証明書作成
#cd/etc/pki/tls/certs
#make server.crt
#vi/e ...