Rhino

Rhino is an open source JavaScript implementation that is being developed. Rhino is written in Java and is managed and distributed by the Mozilla Foundation. The Mozilla Foundation also provides software called SpiderMonkey implemented in C language.

The development of Rhino was launched by Netscape Communications in 1997, and after being transferred to the Mozilla Foundation in 1998 it became open source software. The name of Rhino was from the animal drawn on the cover of JavaScript book published by O’Reilly.

$ sudo yum install rhino

インストール:
  rhino.noarch 0:1.7R4-4.el6

依存性関連をインストールしました:
  jline.noarch 0:0.9.94-0.8.el6

完了しました!

pulseaudio-libs

[vagrant@localhost ~]$ yum list installed | grep pulseaudio-libs
[vagrant@localhost ~]$

うーん、audioの設定??

$ sudo yum install pulseaudio-libs

依存性関連をインストールしました:
  flac.x86_64 0:1.2.1-7.el6_6             libasyncns.x86_64 0:0.8-1.1.el6
  libogg.x86_64 2:1.1.4-2.1.el6           libsndfile.x86_64 0:1.0.20-5.el6
  libvorbis.x86_64 1:1.2.3-5.el6_9.1

完了しました!

サウンド関連モジュールを見てみたい。
[vagrant@localhost ~]$ lsmod | grep snd
snd_intel8x0 30524 0
snd_ac97_codec 125159 1 snd_intel8x0
ac97_bus 1452 1 snd_ac97_codec
snd_seq 61189 0
snd_seq_device 7277 1 snd_seq
snd_pcm 94209 2 snd_intel8x0,snd_ac97_codec
snd_timer 22843 2 snd_seq,snd_pcm
snd 74199 6 snd_intel8x0,snd_ac97_codec,snd_seq,snd_seq_device,snd_pcm,snd_timer
soundcore 7990 1 snd
snd_page_alloc 8856 2 snd_intel8x0,snd_pcm

yum list installed | grep

インストール済みの確認
[vagrant@localhost ~]$ yum list installed | grep alsa-lib
alsa-lib.x86_64 1.1.0-4.el6 @base

alsa-lib: ALSA サウンドインターフェースへのアクセスを必要とする (ALSA ユーティリティ を含む) プログラムが利用する ALSA ライブラリ
http://lfsbookja.osdn.jp/BLFS/svn-ja/multimedia/alsa-lib.html

[vagrant@localhost ~]$ yum list installed | grep giflib
giflib.x86_64 4.1.6-3.1.el6 @base
giflib:The GIFLIB project maintains the giflib service library, which has been pulling images out of GIFs since 1989. It is deployed everywhere you can think of and some places you probably can’t – graphics applications and web browsers on multiple operating systems, game consoles, smartphones, and likely your ATM too
http://giflib.sourceforge.net/

batch処理

バッチ処理一覧
|No.|業務ID|業務名|JOBID|JOB名|説明|実行サーバー|処理サイクル|起動時間|備考|

Investigation when cron does not work well

If you are trying to run it regularly using cron, you will only get the execution log in “/var/log/cron.log”.
Therefore, the following is a reference as a method for letting the execution result of the command be outputted to the file.

1. Standard output
When outputting only standard output
/path/script.sh 1 > /path/exec.log

2. Error output
When only error output is issued
/path/script.sh 2 > /path/error.log

3. Standard output and error output part1
When outputting both outputs to one file
/path/script.sh > /path/both.log 2>&1

4. Standard output and error output No.2
When outputting each output to a separate file
/path/script.sh 1 > /path/exec.log 2> /path/error.log

How to specify envelop-from with PHP

To specify envelop-from in mail function, it is specified in $additional_parameters of the fourth argument.

$to = 'info@master.com';
$subject = 'test mail';
$msg = "hogehoge";
$header = "From: sender@sample.com";
$opt = 'sender@yahoo.co.jp';
$r = mail($to, $subject, $msg, $headers, $opt);
var_dump($r);

Writing Reply-to for mail sending

1.From, 2.Reply-to, 3.CC, 4.BCC, 5.Reply-to

mb_language("Japanese");
mb_internal_encoding("UTF-8");

$email = "xxx@example.com";
$subjet = "test";
$body = "this is test \n";
$to = 'yyy@example.com';
$header = "From: $email\nReplay-To: $email\n";

mb_send_mail($to; $subject, $body, $header);

Oracle Long

Columns defined as Long can store variable-length character data containing up to 2 GB of information. Long data is text data which is converted properly even if it moves between different systems.

Columns of the LONG data type are used in the data dictionary to store the text of the view definition. You can use the Long column of the SELECT list, the SET clause of the UPDATE statement, and the VALUES clause of the INSERT statement.

java.util.Properties props = new java.util.Properties();
props.put("user", "scott");
props.put("password", "tiger");
props.put("server", "myserver");

Driver myDriver = (Driver)
  Class.forName("weblogic.jdbc.oci.Driver").newInstance();

Connection conn = (weblogic.jdbc.oci.Connection)
	myDriver.connect("jdbc:weblogic:oracle", props);

	conn.waitOnResources(true);

yum clean all

Delete the cache with the yum clean command and check and execute the yum update. The file for caching rpm packages and data used for installing or updating by yum is saved in /var/cache/yum. Can confirm with the “du” command.

[vagrant@localhost tests]$ du -sh /var/cache/yum
179M    /var/cache/yum

/dev/null

/dev/null, also called null device, is one special file in Unix or Unix-type operating system, discards all the data written in it(write system call succeeds). It does not return data to any process (returns EOF)

[vagrant@localhost tests]$ sudo cat /dev/null
[vagrant@localhost tests]$